Linux-C基礎知識學習:C語言做業-輸入兩個數,將兩個數交換,按升序輸出。

Linux基礎知識學習 C語言做業:輸入兩個數,利用函數、指針,排序後,按升序輸出。web #include <stdio.h> void swap(int *x,int *y){ //利用指針,直接根據內存地址,對內存空間進行操做! int temp; temp = *x; *x = *y; *y = temp; } main(){ int a,b; printf("輸入兩個數:"); sca
相關文章
相關標籤/搜索