码迷,mamicode.com
首页 > 编程语言 > 详细

C语言之赋值

时间:2016-08-02 14:51:43      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:

#include<stdio.h>
/*void change(int m,int n)
{
int t;
t=m;
m=n;
n=t;
}*/
int main()
{
//交换两杯水,需要一个空杯子,临时保存作用
int a=5;
int b=6;
int t;
//scanf("%d%d",&a,&b);
t=a;
a=b;
b=t;
printf("%d %d\n",a,b);

return 0;
}
//注意:在两个数做运算时,只要有一个是浮点数,计算的结果均为浮点数!

C语言之赋值

标签:

原文地址:http://www.cnblogs.com/gcter/p/5729054.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!