#include<stdlib.h>
#include<time.h>
#include<iostream>
using namespace std;
int kubik()
{
int q=1;
q = rand() % 6 + 1;
return q;
}
int main()
{
srand(time(NULL));
char im[50];
int e = 0;
cout << "Vvedit vashe imia: ";
cin >> im;
do
{
cout << "\nHto hodit pershii?(0-wi, 1-kamputir):\n";
cin >> e;
switch (e)
{
case 0:
cout << "nolek\n";
break;
case 1:
cout << "adin\n";
break;
default:
cout << "error! 0, 1 only\n";
}
} while (e > 1);
int t = kubik();
cout << t << endl;
t = kubik();
cout << t << endl;
t = kubik();
cout << t << endl;
t = kubik();
cout << t << endl;
t = kubik();
cout << t << endl;
t = kubik();
cout << t << endl;
system("pause");
}
I2luY2x1ZGU8c3RkbGliLmg+IAojaW5jbHVkZTx0aW1lLmg+IAojaW5jbHVkZTxpb3N0cmVhbT4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKIAppbnQga3ViaWsoKQp7CiAgICBpbnQgcT0xOwoKICAgICAgICBxID0gcmFuZCgpICUgNiArIDE7CiAgICAgICAgcmV0dXJuIHE7Cn0KIAppbnQgbWFpbigpCnsgICAgCiAgICBzcmFuZCh0aW1lKE5VTEwpKTsKICAgIGNoYXIgaW1bNTBdOwogICAgaW50IGUgPSAwOwogICAgY291dCA8PCAiVnZlZGl0IHZhc2hlIGltaWE6ICI7CiAgICBjaW4gPj4gaW07CiAgICBkbwogICAgewogICAgICAgIGNvdXQgPDwgIlxuSHRvIGhvZGl0IHBlcnNoaWk/KDAtd2ksIDEta2FtcHV0aXIpOlxuIjsKICAgICAgICBjaW4gPj4gZTsKICAgICAgICBzd2l0Y2ggKGUpCiAgICAgICAgewogICAgICAgIGNhc2UgMDoKICAgICAgICAgICAgY291dCA8PCAibm9sZWtcbiI7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIGNhc2UgMToKICAgICAgICAgICAgY291dCA8PCAiYWRpblxuIjsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgY291dCA8PCAiZXJyb3IhIDAsIDEgb25seVxuIjsKICAgICAgICB9CiAKICAgIH0gd2hpbGUgKGUgPiAxKTsKIAogCiAgICBpbnQgdCA9IGt1YmlrKCk7CiAgICBjb3V0IDw8IHQgPDwgZW5kbDsKICAgIHQgPSBrdWJpaygpOwogICAgY291dCA8PCB0IDw8IGVuZGw7CiAgICB0ID0ga3ViaWsoKTsKICAgIGNvdXQgPDwgdCA8PCBlbmRsOwogICAgIHQgPSBrdWJpaygpOwogICAgY291dCA8PCB0IDw8IGVuZGw7CiAgICAgdCA9IGt1YmlrKCk7CiAgICBjb3V0IDw8IHQgPDwgZW5kbDsKICAgICB0ID0ga3ViaWsoKTsKICAgIGNvdXQgPDwgdCA8PCBlbmRsOwogICAgc3lzdGVtKCJwYXVzZSIpOwp9