摘要:
#include int main(int argc, char *argv[]) { int num[10],i,sum=0;/*10个实数,循环变量,和,平均*/ float avg = 0; printf("Please enter ten integers:\n"); for(i=0;i<10;i++)/*接受10个实数*/ { scanf("%d", &num[i]); } f... 阅读全文
摘要:
#include int main(int argc, char *argv[]) { int i,j,k,max; printf("Please enter three integers:"); scanf("%d%d%d", &i, &j, &k); max = i>j?i:j; max = max > k?max:k; printf("max:%d",max); return 0; }... 阅读全文
摘要:
#include int main(int argc, char *argv[]) { int num,i; bool flag = true; /*初始化判断结果*/ scanf("Please enter a real number:%d",&num);/*接受一个实数*/ for(i=2;i<num;i++)/*穷举判断*/ { ... 阅读全文