quiz08-4.cpp

来自「数据结构常用算法合集」· C++ 代码 · 共 20 行

CPP
20
字号
//quiz08-4.cpp
#include <iostream.h>
#include <conio.h>
void swap(int *,int *);
void main()
{ int a=10,b=15;
  cout << "Before swap="<<a<<','<<b;
  swap(&a,&b);
  cout << "\nAfter swap="<<a<<','<<b;
  getch();
}
void swap(int *a,int *b)
{ int data;
  data=*a;
  *a=*b;
  *b=data;
}


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?