设a = 3 , b = 4 , c = 5 , d = 1.2 , e = 2.23 , f = – 43.56 , 编写程序,使程序输出为:a = 3 , b = 4, c = * * 5d = 1.2e = 2.23f = – 43.5600* *
执行下列程序,按指定方式输入(其中 表示空格),能否得到指定的输出结果?若不能,请修改程序,使之能得到指定的输出结果。输入:2 3 4↙输出:a = 2 , b = 3 , c = 4x = 6 , y = 24程序:#include void main(void){int a , b, c ,x ,y;scanf(" %d , %d , %d ", a , b , c);x = a*b ;y=x*c;printf(" %d %d %d ",a , b , c);printf(" x=%f\n ",x , " y=%f\n" , y);}
若变量已正确说明为int类型,要给a、b、c输入数据,正确的输入语句是
A. read(a,b,c);
B. scanf(“%d%d%d”,a,b,c);
C. scanf(“%D%D%D”,&a,&b,&c);
D. scanf(“%d%d%d”,&a,&b,&c);