Swap the values of two variables

From , 4 Years ago, written in C, viewed 53 times.
URL https://pastebin.vip/view/e82c4b19
  1. #include <stdio.h>
  2. void main ()
  3. {
  4.         int a,b,c;                                      //定义整形变量
  5.         a=10,b=20;                                      //给变量赋值
  6.         printf("a=%d,b=%d\n",a,b);      //输出交换前的值
  7.         c=a,a=b,b=c;                            //交换过程
  8.         printf("a=%d,b=%d\n",a,b);      //输出交换后的值
  9. }

Reply to "Swap the values of two variables"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website