第一篇:C++编程:三个整数a、b、c,由键盘输入,按小到大顺序输出
C++编程:三个整数a、b、c,由键盘输入,按小到大顺序输出。#include“iostream.h”
void main()
{
int a,b,c,t;
cout<<“请输入a b c三个数:”< cin>>a>>b>>c; if(a {t=a;a=b;b=t;} if(b {t=b;b=c;c=t; if(a {t=a;a=b;b=t;} } cout< }
C++编程:三个整数a、b、c,由键盘输入,按小到大顺序输出。#include“iostream.h”
void main()
{
int a,b,c,t;
cout<<“请输入a b c三个数:”< cin>>a>>b>>c; if(a {t=a;a=b;b=t;} if(b {t=b;b=c;c=t; if(a {t=a;a=b;b=t;} } cout< }
文档为doc格式