c++中有个清屏函数,system(“cls”)

#include<iostream>
using namespace std;
void max(int &x,int &y)
{int a;
 cout<<"udhcu"<<endl;
 int t;
 t=x;
 x=y;
 y=t;
 cin>>a;
 cout<<"dci"<<endl;
 system("cls");
}
int main()
{
 int a,b;
 cin>>a>>b;
 cout<<"a,b is "<<a<<" "<<b<<endl;
 system("cls");
 max(a,b);//不能用常量作为参数
 cout<<"a,b is "<<a<<" "<<b<<endl;
 return 0;
}
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页