运行程序,输出结果是()。#include main ( ){int a=5, b=10;do{ b=b-a;a++;} while( b-- >0 );printf("%d %d\n", a, b);}
查看答案
运行程序,输出结果是( )。#include main ( ){int i, t=1;for(i=1; i<=5; i++)t=t*i;printf ("%d\n", t);}
运行程序,从键盘输入“ABCdef123#”,输出结果是( )。#include main ( ){char ch, i=0, j=0;while(ch=getchar(), ch != '#'){ if(ch>='A' && ch<='Z') { i=i+1; ch=ch+32; }if(ch>='a' && ch<='z') j=j+1;}printf ("%d %d\n", i, j);}
运行程序,从键盘输入“237”,输出结果是( )。#include main ( ){char ch, i=0, j=0;while(ch=getchar(), ch != '\n')switch(ch-'2'){ case 0:case 1: putchar(ch+1);case 2: putchar(ch+2); break;case 3: putchar(ch+3);default: putchar(ch); break;}putchar(10);}
运行程序,从键盘输入“I am a student!”,输出结果是()。#include main(){char ch, n=0;while( (ch=getchar()) != '\n' )switch( ch ){ case 'a': continue;case 't': break;default: n++;}printf("%d\n", n);}