} 4-15
#include
char str[100],a; cin>>str>>a; cout< int find(char str[],char a) { for (int i=0;str[i]!='\\0';i++) { if (str[i]==a) { return i; break;} } if (str[i]=='\\0') return -1; } 4-16 //4_16 #include int change (int n,int R,int *a); int main() { cout<<\input n and R(2<=R<=16)\ int n,R,a[10]; cin>>n>>R; int i=change(n,R,a); for (int j=i-1;j>=0;j--) { switch (a[j]) { case 11:cout<<'A';break; case 12:cout<<'B';break; case 13:cout<<'C';break; case 14:cout<<'D';break; case 15:cout<<'E';break; default: cout< system(\ return 0; } int change (int n,int R,int *a) { int i=0; while (n!=0) { *(a+i)=n%R; n/=R; i++; } return i; } 4-17 #include int sum=0; int a[2][N]; sum=init(a); cout<<\ fun1(a); cout<<\ fun2(a); cout<<\ fun3(a,sum); cout<<\ fun4(a); return 0; } int init(int a[][N]) { int sum=0; for (int i=0;i<=N-1;i++) { a[0][i]=i+1; cin>>a[1][i]; sum+=a[1][i]; } return sum; } void fun1(int a[][N]) {