@Alex566
241 / 153 / 18
Регистрация: 03.04.2013
Сообщений: 317
|
31.12.2013, 02:07
|
|
C++ | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| #include <iostream>
using namespace std;
int main()
{
unsigned a;
do
{
cout << "Input number - ";
cin >> a;
} while (a<100000 || a>999999);
if (((a / 100000) % 10) + ((a / 10000) % 10) + ((a / 1000) % 10) == ((a / 100) % 10) + ((a / 10) % 10) + (a % 10))
cout << "Lucky!"<<endl;
else
cout << "=("<<endl;
system("pause");
return 0;
} |
|
1
|