设有语句“char c=’\72′;”,则变量c
#include
int main()
{
int a=666,b=888;
printf("%d\n",a,b);
return 0;
}
#include
int main()
{
int n1=10,n2=20;
printf("_________",n1,n2);
return 0;
}
要求按以下格式输出n1和n2的值,每个输出行都是从第一列开始,则空白处代码填写正确的是运行结果示例如下:n1=10n2=20
#include
int main()
{
char c1 = 'a', c2 = 'b', c3 = 'c';
printf("a%cb%cc%cabc\n", c1, c2, c3);
return 0;
}
scanf("a=%d,b=%d",&a,&b);
#include
int main()
{
int a,b,c,d;
scanf("%c%c%d,%d",&a,&b,&c,&d);
printf("%c,%c,%c,%c\n",a,b,c,d);
return 0;
}
若运行以上程序时从键盘上输入:6565,66。则输出结果是
#include
int main()
{
int a,b,s;
scanf("%2d%2d",&a,&b);
s=a/b;
printf("s=%d",s);
return 0;
}
#include
int main()
{
float a = 1234.567,b = 55.32;
printf("a = %4.2f, b = %5.1f\n", a,b);
return 0;
}
#include
int main()
{
int a=1234;
printf("%2d\n",a);
return 0;
}
#include
int main()
{
int x=6,y,z;
x*=18+1;
printf("%d,",x--);
x+=y=z=11;
printf("%d",x);
return 0;
}
#include
int main()
{
int a,b,sum;
scanf("%d%*c%d",&a,&b);
sum=a+b;
printf("sum=%d",sum);
return 0;
}
#include
int main()
{
int a,b,s;
char op;
scanf("%d %c%d",&a,&op,&b);
s=a%b;
printf("s=%d",s);
return 0;
}
程序运行时从键盘输入:15%5
#include
int main()
{
int a,b,c,d;
char op1,op2,op3;
int sum;
printf("please input:a+b+c+d\n");
scanf("%d%c%d%c%d%c%d",&a,&op1,&b,&op2,&c,&op3,&d);
sum=a+b+c+d;
printf("sum=%d",sum);
return 0;
}
程序运行时从键盘输入:12+3+1