摘要:
阅读全文
摘要:
#includeint main(void){ double x,y; printf("Enter x(x>=0):\n"); scanf("%lf",&x); /*if-else语句*/ if(x<=15){ y=4*x/3; } else{ y=2.5*x-10.5; } printf("y=f(%f)=%.2f\n",x,y); return 0;} 阅读全文
摘要:
#includeint main(void){ int celsius,fahr; fahr=100; celsius=5*(fahr-32)/9; printf("fahr=%d,celsius=%d\n",fahr,celsius); return 0;} 阅读全文
摘要:
#includeint main(void){ printf("Programming is fun.]\n"); printf("And programming in C is even more fun.\n"); return 0;} 阅读全文
摘要:
#includeint main(void){ printf("Hello World!\n"); return 0;} 阅读全文
摘要:
#includeint main(void){ int i,sum=0; for (i=1;i<=100;i++) if(i%2==0) sum=sum+i; printf("%d",sum); return 0;} 阅读全文