">以下程序的输出结果是#include
int main()
{
int a=1234;
printf("%2d\n",a);
return 0;
}
#include
int main()
{
int a=1234;
printf("%2d\n",a);
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() { char a,b; int s; printf("please input a and b:\n"); a=getchar(); b=getchar(); s=a+b; printf("a=%c,b=%c",a,b); return 0; }
scanf("a=%d,b=%d",&a,&b)
#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
#include
int main()
{
int a = 5, b = 4, x, y;
x = 2 * a++;
y = --b * 2;
printf("a=%d, x=%d\n", a, x);
printf("b=%d, y=%d\n", b, y);
return 0;
}
#include
int main()
{
int n1=10,n2=20;
printf("_________",n1,n2);
return 0;
}
要求按以下格式输出n1和n2的值,每个输出行都是从第一列开始,则空白处代码填写正确的是运行结果示例如下:n1=10n2=20
#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()
{
char c1 = 'a', c2 = 'b', c3 = 'c';
printf("a%cb%cc%cabc\n", c1, c2, c3);
return 0;
}
#include
int main()
{
int a=2, c=5;
printf("a = %%d, b = %%d\n", a, c);
return 0;
}
#include
int main()
{
char ch;
ch=getchar();
ch=ch+32;
printf("%c",ch);
return 0;
}