#include#include#includestruct stud_type{ char name[20]; long num; char sex;};void print(struct stud_type *p){ int i; for(i=0;iname,(p+i)->num,(p+i)->sex); //printf("%-20s%8ld%c\n",(... Read More
posted @ 2007-01-21 16:28 齐心 Views(1014) Comments(0) Diggs(0) Edit
#include#includevoid show(int c[][3]){ int i,j; for(i=0;i<5;i++) {for(j=0;j<3;j++) printf("%d\t",c[i][j]); printf("\n"); }}void main(){ int a[5][5]={{1,2,3,4,5},{6,7,8,9,10},{11,12,13,14,15}... Read More
posted @ 2007-01-21 09:21 齐心 Views(987) Comments(0) Diggs(0) Edit
若正整数A的所有因子(包括1但不包括自身,下同)之和为B,而B的因子之和为A,则称A和B为一对亲密数。例如,6的因子之和为1+2+3=6,因此6与6为一对亲密数(即6自身构成一对亲密数);又如,220的因子之和为l+2+4+5+10+11+20+22+44+55+110=284,而284的因子之和为1+2+4+71+142—220,因此,220与284为一对亲密数。 #include#includ... Read More
posted @ 2007-01-21 08:44 齐心 Views(7901) Comments(4) Diggs(1) Edit