> 其他 >
怎么编写C程序:交换数据.对于输入的两个变量a和b,交换他们的值并输出
人气:436 ℃ 时间:2020-05-14 15:19:29
解答
你这个问题也太简单了吧,看来你是初学者:
#include
void main()
{
int a,b,t;
scanf("%d%d",&a,&b);
t=a;a=b;b=t;
printf("\n%d %d\n",a,b);
}
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版