摘要: 1.编写程序,使用while语句求和sum=1+3+5+…+21。 #include<stdio.h> main(){ int i=1,sum=0; while(i<=21){ sum=sum+i; i+=2; } printf("sum=%d\n",sum); } 2.编写程序,使用while语句 阅读全文
posted @ 2021-11-02 10:16 浅殇之城 阅读(22) 评论(0) 推荐(0)