随笔分类 -  数论

摘要:#include<stdio.h>#include<string.h>#include<stdlib.h>#include<math.h>int x,y;int extended_gcd(int a,int b){ int t,gcd; if(b==0) { x=1; y=0; return a; } gcd=extended_gcd(b,a%b); t=x; x=y; y=t-a/b*y; return gcd;}int main(){ int a[3],d; int i; int m[3]={23,28,33}; int M; int w; 阅读全文
posted @ 2012-07-12 08:43 willzhang 阅读(197) 评论(0) 推荐(0)
摘要:#include<stdio.h>#include<string.h>#include<stdlib.h>#include<math.h>int main(){ double a[12]; int i,j; double sum=0; for(i=0;i<12;i++){ scanf("%lf",&a[i]); sum+=a[i]; } sum=sum/12; printf("$%.2f\n",sum); //system("PAUSE"); return 0;}纯水T_T 阅读全文
posted @ 2012-07-12 08:41 willzhang 阅读(87) 评论(0) 推荐(0)