摘要:
#includeusing namespace std;void chengji(const float s[5][3] );int main( ) { float s[5][3]; int i,j; for (i=0;i>s[i][j]; chengji(s); return 0; } void chengji(const float s[5][3]) { int i,j; float sum=0; for(i=0;i<5;i++){for(j=0;j<3;j++) sum=sum+s[i][j]; cout<<"第"<<i+1& 阅读全文
摘要:
#includeusing namespace std;long fac(int n);int main () { int n; cout>n ; cout<<fac(n)<<endl; return 0; } long fac(int n) {if(n==1) return n;else return (2*n-1)*fac(n-1); } 阅读全文
摘要:
#includeusing namespace std;char * stringcat(char *source, const char *dest);int main() { char s1[30]="I love "; char *s2="C++"; stringcat(s1,s2); cout<<s1<<endl; return 0; } char * stringcat(char *source, const char *dest) { char *p=source;for(int i=0;i<7;i++) sou 阅读全文