1 #include <iostream>
 2 
 3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */
 4 using namespace std;
 5 int main(int argc, char** argv) {
 6 void swap(int,int);
 7 int i=3,j=5;
 8 swap(i,j);
 9 cout <<i<<" "<<j<<endl;
10 return 0;
11 }
12 
13 void swap(int a,int b)
14 {
15 int temp;
16 temp=a;
17 a=b;
18 b=temp;
19 cout <<a<<" "<<b<<endl;
20 }

 

相关文章:

  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2021-12-03
  • 2021-10-16
  • 2021-05-21
相关资源
相似解决方案