- ©«¤l
- 145
- ¥DÃD
- 45
- ºëµØ
- 0
- ¿n¤À
- 190
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_¥«
- µù¥U®É¶¡
- 2013-10-18
- ³Ì«áµn¿ý
- 2014-3-29
|
¦^´_ sjgau
ªO¤j
§Ú³q±`µo¥Í°ÝÃD¡A³£·|¥ý¨Ó³o¸Ì¬Ý¤@¹M»¡©ú¡A³q±`³o¸Ì³£·|§t¦³µ{¦¡½X¥i¥H¬ã¨s
...
handsometrowa µoªí©ó 2013-11-13 09:16 - #include <stdio.h>
- #include <stdlib.h>
- // ----------------------------------------------
- void swap_int(int a, int b)
- {
- printf("\n °Æµ{¦¡¡A¥æ´«¤§«e¡G a= %d, b= %d \n", a, b);
- system("pause");
- // -------------------------------------------
-
- int c= a;
- a= b;
- b= c;
- printf("\n °Æµ{¦¡¡A¥æ´«¤§«á¡G a= %d, b= %d \n", a, b);
- system("pause");
- }// end of swap_int()
- // ----------------------------------------------
-
- int main(int argc, char *argv[])
- {
- int a, b, c;
- srand(time(NULL));
- a= rand()%1000;
- b= rand()%1000;
- printf("\n ¥Dµ{¦¡¡A¥æ´«¤§«e¡G a= %d, b= %d \n", a, b);
- system("pause");
- // -------------------------------------------
-
- swap_int(a, b);
-
- printf("\n ¥Dµ{¦¡¡A¥æ´«¤§«á¡G a= %d, b= %d \n", a, b);
- system("pause");
- // -------------------------------------------
-
- return 0;
- }
½Æ»s¥N½X |
|