我在黑色的框里面输入什么格式才是对的
#include <stdio.h>
main()
{
int a,b,temp;
printf("请输入a和b的值:");
scanf("%d%d,&a,&b");//多打了个双引号
printf("a=%d,b=%d ",a,b);
temp=a;
a=b;
b=temp;
printf("a=%d,b=%d ",a,b);
}
#include<stdio.h>
main()
{
int a,b,temp;
printf("请输入两个数:");
scanf("%d,%d",&a,&b);
printf("a=%d,b=%d\n",a,b);
temp = a;
a = b;
b =temp;
printf("a=%d,b=%d",a,b);
}
你试试这个