【3 scanf】 有以下程序 #include main() { int x,y; scanf(“%2d%1d”,&x,&y);printf("%d\n",x+y); } 程序运行时输入:1234567,程序的运行结果是【 】
举一反三
- 执行下列程序时输入:1234567,程序的运行结果是( ) main() { int x,y; scanf(“%2d%*2c%1d”,&x,&y); printf(“%d ”,x+y); }
- 读程序写结果 int main() { int x,y; scanf("%2d%*2d%ld",&x,&y); printf("%d ",x+y); } 执行时输入:1234567
- 有以下程序,程序运行时输入1234567[回车]程序运行的结果是 。#include[stdio.h]void main(){ int x,y; scanf("%2d%3d",&x,&y); //双引号中是百分号2d百分号3d,即scanf("%2d%3d",&x,&y); printf("%d\n",x+y);}
- 若运行时给变量x输入12,则以下程序的运行结果是_______ main() { int x,y; scanf("%d",&x); y=x+10; printf("%d,%d ",x,y); }
- 若运行时为变量x输入12 则以下程序的运行结果是 include stdio h int main int x y scanf d x y x 12 x 10 x 12 printf d n y return 0 A0B22C12D10