如何用c语言编写从键盘输入3个数给a,b,c,然后依次交换他们中的数?void main() { int a,b,c,d; printf("exchange of three number\n") scanf("%d%d%d,&a,&b,&c"); printf("Input number is:%d and d% and %d\n",a,b,c); d=a; a=b; b=c;
来源:学生作业帮助网 编辑:六六作业网 时间:2025/01/05 03:44:01
如何用c语言编写从键盘输入3个数给a,b,c,然后依次交换他们中的数?void main() { int a,b,c,d; printf("exchange of three number\n") scanf("%d%d%d,&a,&b,&c"); printf("Input number is:%d and d% and %d\n",a,b,c); d=a; a=b; b=c;
如何用c语言编写从键盘输入3个数给a,b,c,然后依次交换他们中的数?
void main()
{
int a,b,c,d;
printf("exchange of three number\n")
scanf("%d%d%d,&a,&b,&c");
printf("Input number is:%d and d% and %d\n",a,b,c);
d=a;
a=b;
b=c;
c=d;
printf("exchange is:%d%d%d\n"a,b,c,);
getch();
}
这是我写的,但是编译不成功,请教各位大哥大姐帮帮我改改错误吧!
如何用c语言编写从键盘输入3个数给a,b,c,然后依次交换他们中的数?void main() { int a,b,c,d; printf("exchange of three number\n") scanf("%d%d%d,&a,&b,&c"); printf("Input number is:%d and d% and %d\n",a,b,c); d=a; a=b; b=c;
void main()
{
int a,b,c,d;
printf("exchange of three number\n")
scanf("%d%d%d",&a,&b,&c);
printf("Input number is:%d and d% and %d\n",a,b,c);
d=a;
a=b;
b=c;
c=d;
printf("exchange is:%d%d%d\n",a,b,c,);
getch();
}