下面程序段是从键盘输入的字符中统计数字字符的个数,用换行符结束循环。int n = 0, c;c = getchar();while ( ____________________ ) {if ( ____________________) n++;c = getchar();}
下面程序的功能是用do-while语句求1—1000之间满足“用3除余2,用5除余3,用7除余2”的数,且一行只打印5个数。#include main() {int i = 1; j = 0;do {if ( ________________________________________ ) {printf(“%4d”, i);j = j +1;if ( ____________________ ) printf(“\n”);}i = i + 1} while (i < 1000);}
下面程序的功能是打印100以内个位数为6,且能被3整除的所有数。#include main() {int i, j;for (i = 0; ____________________; i++) {j = i * 10 + 6;if ( ____________________ ) continue;printf(“%d”, i);}}
1. 以下程序的运行结果是( )。main() {int m = 5;if (m++ > 5)printf(“%d \n”, m);elseprintf(“%d \n”, m--);}
A. 4
B. 5
C. 6
D. 7