
void solution(char *s1,char *s2){ int i,j; i=j=0; while(*s1!='\0'){ if(*s1>'0' && *s1<'9'){ *s2 = *s1; s2++; } s1++; }}

#include <iostream>using namespace std;int main(){int a[20] = {2,3};int temp = 0;int i = 2;while(i<20){ temp = a[i-1]*a[i-2]; //cout<<"temp="<<temp<<endl; if(temp>=10){ if(i+1<20){ a[i+1]=temp%10; } a[i] = temp/10; i++; }else{ a[i] = temp; } i++;}for(int i=0;i<20;i++){ cout<<a[i]<<endl;} return 0;}
2018年

#include<iostream>using namespace std;void solution_arr(char *a);void solution_point(char *a);int main(){ char str[] = "1234567890"; solution_arr(str); cout<<str<<endl; return 0;}void solution_arr(char *a){ int n=0 ; char temp; while(a[++n]!='\0'); for(int i;i<(n+1)/2;i++){ temp = a[i]; a[i] = a[n-i-1]; a[n-i-1] = temp; }}