Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Denkotleta221/0aa8a296db12a64aca7b81b4ca9339d8 to your computer and use it in GitHub Desktop.
Save Denkotleta221/0aa8a296db12a64aca7b81b4ca9339d8 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
SetConsoleOutputCP(CP_UTF8);
//1) Task
/*int a;
int b;
char func;
int result = 0;
cout << "Enter firt number: ";
cin >> a;
cout << "Enter second number: ";
cin >> b;
cout << "Chois function(+, -, *, /, %): ";
cin >> func;*/
/*if (func == '+') {
result = a + b;
}
else if (func == '-') {
result = a - b;
}
else if (func == '*') {
result = a * b;
}
else if (func == '/') {
if (a == 0 or b == 0) {
cout << "Fali";
}
result = a / b;
}
else if (func == '%') {
result = a % b;
}*/
/*switch (func) {
case '+':
result = a + b;
break;
case '-':
result = a - b;
break;
case '*':
result = a * b;
break;
case '/':
result = a / b;
break;
case '%':
result = a % b;
break;
}
cout << "Result " << result;*/
// 2) Task
/*cout << "Welcome to the game Who Wants to Be a Millionaire!!! \nFirst Question:";
char answer;
cout << "1. How many continents are there on Earth? \n";
cout << "1) 4 \n2) 5 \n3) 6 \n4) 7\n";
cin >> answer;
if (answer == '3') {
cout << "Greate next question\n\n";
}
else {
cout << "Don`t corect answer";
exit;
}
cout << "2. What is the capital of Great Britain?\n";
cout << "1) London \n2) Brazil \n3) Warsava \n4) Kyiv\n";
cin >> answer;
if (answer == '1') {
cout << "Greate next question\n\n";
}
else {
cout << "Don`t corect answer";
exit;
}
cout << "3. What color are the bears at the North Pole?\n";
cout << "1) Black \n2) White \n3) Green \n4) Orange\n";
cin >> answer;
if (answer == '2') {
cout << "Greate next question\n\n";
}
else {
cout << "Don`t corect answer";
exit;
}
cout << "4. How many oceans are there on Earth?\n";
cout << "1) 6 \n2) 3 \n3) 4 \n4) 5\n";
cin >> answer;
if (answer == '4') {
cout << "Greate next question\n\n";
}
else {
cout << "Don`t corect answer";
exit;
}
cout << "5. Who created Facebook?\n";
cout << "1) Elon Mask \n2) Jeff Bezos \n3) Mark Zuckerberg \n4) Jhon Smit\n";
cin >> answer;
if (answer == '3') {
cout << "Greate job it will last question\n\nCongratulation on your victory!!";
}
else {
cout << "Don`t corect answer";
exit;
}*/
// 3) Task
/*srand(time(0));
string text;
cout << "Welcome in Molphar 9000\n";
cout << "Your question: ";
cin >> text;
int rand_num = 1 + rand() % 15;
switch (rand_num)
{
case 1:
cout << "Maybe";
break;
case 2:
cout << "Yes";
break;
case 3:
cout << "No";
break;
case 4:
cout << "Always";
break;
case 5:
cout << "50%/50%";
break;
case 6:
cout << "Soon, no";
break;
case 7:
cout << "Soon, yes";
break;
case 8:
cout << "I'm don't know";
break;
case 9:
cout << "Can will be";
break;
case 10:
cout << "Don't will be";
break;
case 11:
cout << "Can";
break;
case 12:
cout << "Soon you will know";
break;
case 13:
cout << "Forget";
break;
case 14:
cout << "Repet one more";
break;
case 15:
cout << "Must be good";
break;
}*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment