亚洲国产aⅴ,久久99精品九九九久久婷婷,日韩在线第三页,a在线视频免费观看,久久精品不卡毛片,国产精品无套,亚洲性图一区二区

設(shè)置一個(gè)臨時(shí)變量交換兩個(gè)變量的值 -電腦資料

電腦資料 時(shí)間:2019-01-01 我要投稿
【www.parislogo.com - 電腦資料】

     當(dāng)要交換兩個(gè)數(shù)的值時(shí),通常的做法是定義一個(gè)臨時(shí)變量,然后再進(jìn)行交換,

設(shè)置一個(gè)臨時(shí)變量交換兩個(gè)變量的值

。

    C語言代碼如下:

   

# include <stdio.h>int main(){   int a, b;   int *p;    //臨時(shí)變量       scanf("%d %d", &a, &b);       p = a;   a = b;   b = p;       printf("交換后的值為:");   printf("%d %d\n", a, b);   return 0;}

最新文章