📄 6_1.cpp
字号:
#include<iostream.h>
#include<iomanip.h>
void main()
{
int a,b,c,temp;
int *p1,*p2,*p3;
cout<<"请输入a,b,c:"<<endl;
cin>>a>>b>>c;
p1=&a;p2=&b;p3=&c;
if(*p1>*p2)
{temp=*p1;*p1=*p2;*p2=temp;}
if(*p1>*p3)
{temp=*p1;*p1=*p3;*p3=temp;}
if(*p2>*p3)
{temp=*p2;*p2=*p3;*p3=temp;}
cout<<"从小到大输出为:"<<endl;
cout<<setw(5)<<*p1<<setw(5)<<*p2<<setw(5)<<*p3<<endl;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -