Advertisement
Guest User

Untitled

a guest
Feb 17th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <windows.h>
  4. #include <clocale>
  5. #include <ctime>
  6. using namespace std;
  7. int main()
  8. {
  9. setlocale(LC_ALL, "Russian");
  10. srand(time(0));
  11. cout << "Добро пожаловать на ASINO777";
  12. int balance = 100;
  13. int stavka = 0;
  14. while (balance > 0)
  15. {
  16. cout << "\nBALANCE :" << balance << endl;
  17. cout << "Сколько денег вам не надо :";
  18. cin >> stavka;
  19. if (stavka > balance || stavka < 0)
  20. {
  21. Beep(698, 500);
  22. Sleep(100);
  23. cout << "Тут так не работает" << endl;
  24. continue;
  25. }
  26. while (rand() % 100 > 5)
  27. {
  28. Sleep(rand() % 200);
  29. cout << ".";
  30. }
  31. int a = rand() % 10;
  32. int b = rand() % 10;
  33. int c = rand() % 10;
  34. cout << endl<<"==" << a << ":" << b << ":" << c << "==" << endl<<endl<<endl;
  35.  
  36. if (a == b && b == c)
  37. {
  38. Beep(784, 500);
  39. Sleep(500);
  40. cout << "МОЛОДЕЦ!!\n";
  41. balance += stavka * 3 * a;
  42. }
  43. else
  44. {
  45. if (a == b || b == c || a == c) {
  46. Beep(523, 500);
  47. Sleep(500);
  48. cout << "СОЙДЕТ\n";
  49. balance += stavka * a == b ? a : c;
  50. }
  51. else if ((a == b) && (a == c) && (a == 7)) {
  52. Beep(587, 500);
  53. Sleep(500);
  54. cout << "КРАСАВЧИК!!\n";
  55. balance += stavka * a * a * 10;
  56. }
  57. else if (!(a * b * c)) {
  58. Beep(698, 500);
  59. Sleep(500);
  60. cout << "НОЛЬ В ПОМОЩЬ\n";
  61. }
  62. else {
  63. Beep(440, 500);
  64. Sleep(500);
  65. cout << "НЕ ПОВЕЗЛО :(\n";
  66. balance -= stavka;
  67. }
  68. }
  69. if (balance == 0) {
  70. cout << "Ты все проиграл, друг... Приходи после зарплаты" << endl<<endl;
  71. }
  72. else {
  73. cout << "Ваш баланс: " << balance << endl;
  74. }
  75.  
  76. }
  77. system("pause");
  78. return 0;
  79.  
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement