
11.01.2009, 19:59
|
|
Участник форума
Регистрация: 18.08.2008
Сообщений: 159
С нами:
9332069
Репутация:
92
|
|
Сообщение от ankden
Люди, кто может решить эту задачу без использования массива помогите пожалуйста
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;
}
//---------------------------------------------------------------------------
|
|
|