c语言,交换三个变量

来源:百度知道 编辑:UC知道 时间:2024/06/19 02:45:00
将a赋给b,b赋给c,c赋给a,可以使用中间变量
在线等,急求
这四个没对的,都不能正确执行
#include <stdio.h>
main ()
{
int a,b,c,_______;
printf("Please input a,b,c: ");
scanf("%d%d%d", ___________);
________________________;
________________________;
________________________;
________________________;
printf("a=%d b=%d c=%d\n",a,b,c);
}

是填空题

我弄了半天都是a=2587,b=3561,c=920
我自己写的

#include <stdio.h>
#include <conio.h>

void main (void)
{
int a=1;
int b=2;
int c=3;
int d=0;

printf("Please Input Three Numbers:");
scanf("%d%d%d",a,b,c);

d=a;
a=b;
b=c;
c=d;

printf("\na=%d,b=%d,c=%d",a,b,c);
getch();
}

这个就行

#include <stdio.h>

void main()
{
int a, b, c;
a = 1, b = 2, c = 3;

int temp;

temp = b;
b = a;
a = c;
c = temp;

printf("%d %d %d\n", a, b, c);
}

这程序是对的,这照着填写就可以啊

#include <stdio.h>
main ()
{
int a,b,c,__temp__;
printf("Please input a,b,c: ");
scanf("%d%d%d", __&a,&b,&c__);

temp = b;
b = a;
a = c;