2018年12月11日

摘要: 在这个循环当中,要先执行①,再执行②,再执行④,再执行③,如果还满足②的话就再执行②,再依次执行。当③不满足②时,就执行printf语句。 并且在这个循环当中,①只执行一次。 阅读全文
posted @ 2018-12-11 14:40 StaryLL 阅读(259) 评论(0) 推荐(0)

2018年12月10日

摘要: 出错原因,因为电脑认为没有任何一个语句是以,else开头的。所以就会出错。 阅读全文
posted @ 2018-12-10 23:14 StaryLL 阅读(796) 评论(0) 推荐(0)
摘要: 1 # include 2 int main (void) 3 { 4 int a, b, c; 5 int t; 6 printf("请输入三个整数,中间以空格隔开:"); 7 scanf("%d %d %d", &a, &b, &c); 8 if (a < b) 9 { 10 t = a; 11 ... 阅读全文
posted @ 2018-12-10 22:18 StaryLL 阅读(716) 评论(0) 推荐(0)
摘要: 就好比如两杯水,需要三个杯子将这两杯水互换。互换数字就要用一个中间变量。 阅读全文
posted @ 2018-12-10 18:14 StaryLL 阅读(414) 评论(0) 推荐(0)

2018年12月9日

摘要: 1 # include 2 int main (void) 3 { 4 float score; 5 printf("请输入您的考试成绩:"); 6 scanf("%f", &score); 7 8 if (score > 100) 9 printf("这是做梦"); 10 else if (score>=90 ... 阅读全文
posted @ 2018-12-09 23:23 StaryLL 阅读(1850) 评论(0) 推荐(0)
摘要: 1 # include 2 int main (void) 3 { 4 if (3 > 2) 5 printf("AAAA"); 6 printf("BBBB"); 7 return 0; 8 } 9 //此时结果是,输出AAAA 和 BBBB,因为if只能控制一个语句 上面的第4行和第五行是一个语句,if只能控制一个语句,所以后面的BBBB... 阅读全文
posted @ 2018-12-09 22:44 StaryLL 阅读(849) 评论(0) 推荐(0)

导航