
11.01.2009, 20:14
|
|
Новичок
Регистрация: 28.04.2008
Сообщений: 16
С нами:
9492756
Репутация:
0
|
|
Сообщение от 4p3
PHP код:
//---------------------------------------------------------------------------
#include <iostream>
#include <cstdlib>
#pragma hdrstop
using std::cout;
using std::cin;
using std::endl;
using std::system;
//---------------------------------------------------------------------------
typedef unsigned char uchar;
#pragma argsused
int main(int argc, char* argv[])
{
uchar first, second, third;
int n = 0;
do
{
cout << "enter three digits: ";
cin >> first >> second >> third;
if (first < second && second < third)
{
cout << "Correct input. Here is digits: ";
cout << first << ":" << second
<< ":" << third << endl;
}
else
{
cout << "They are not sorted" << endl;
}
n++;
} while (n < 9);
system("pause");
return 0;
}
//---------------------------------------------------------------------------
спасибо большое
|
|
|