From 099786562c0b3b8e52953e8a352a34e70fbf7106 Mon Sep 17 00:00:00 2001 From: kalyani chaudhari <138003080+misskalyani@users.noreply.github.com> Date: Tue, 2 Apr 2024 05:45:12 -0700 Subject: [PATCH 1/6] Create Calcu --- CPP PROJECT/Calcu | 1 + 1 file changed, 1 insertion(+) create mode 100644 CPP PROJECT/Calcu diff --git a/CPP PROJECT/Calcu b/CPP PROJECT/Calcu new file mode 100644 index 0000000..9d2f316 --- /dev/null +++ b/CPP PROJECT/Calcu @@ -0,0 +1 @@ +zxfghj From df5195c1d74dc90859eb236d2706b6ca90b25e06 Mon Sep 17 00:00:00 2001 From: kalyani chaudhari <138003080+misskalyani@users.noreply.github.com> Date: Tue, 2 Apr 2024 05:49:45 -0700 Subject: [PATCH 2/6] Add files via upload --- CPP PROJECT/Calculator.cpp | 85 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 CPP PROJECT/Calculator.cpp diff --git a/CPP PROJECT/Calculator.cpp b/CPP PROJECT/Calculator.cpp new file mode 100644 index 0000000..9dc5de9 --- /dev/null +++ b/CPP PROJECT/Calculator.cpp @@ -0,0 +1,85 @@ +#include +using namespace std; +int add(int a,int b) +{ + return a+b; +} +int sub(int a,int b) +{ + return a-b; +} +int mul(int a,int b) +{ + return a*b; +} +int div(int a,int b) +{ + return a/b; +} +int main() +{ + int a,b,ch; + cout<<"\n\n\t\t\t\t\t\t My Simple Calculator \n"; + cout<<"\n 1. Addition : "; + cout<<"\n 2. Subtraction : "; + cout<<"\n 3. Multiplication : "; + cout<<"\n 4. Division : "; + do + { + cout<<"\n\nSelect Opertation :: "; + cin>>ch; + switch(ch) + { + case 1: + cout<<"\n\nEnter First Number :: "; + cin>>a; + cout<<"\nEnter Second Number :: "; + cin>>b; + cout<<"\n"; + cout<>a; + cout<<"\nEnter Second Number :: "; + cin>>b; + cout<<"\n"; + cout<>a; + cout<<"\nEnter Second Number :: "; + cin>>b; + cout<<"\n"; + cout<>a; + cout<<"\nEnter Second Number :: "; + cin>>b; + cout<<"\n"; + cout< Date: Tue, 2 Apr 2024 05:50:12 -0700 Subject: [PATCH 3/6] Delete CPP PROJECT/Calcu --- CPP PROJECT/Calcu | 1 - 1 file changed, 1 deletion(-) delete mode 100644 CPP PROJECT/Calcu diff --git a/CPP PROJECT/Calcu b/CPP PROJECT/Calcu deleted file mode 100644 index 9d2f316..0000000 --- a/CPP PROJECT/Calcu +++ /dev/null @@ -1 +0,0 @@ -zxfghj From f12009dc28b7ac1a9deabcdd8160c8c0dd1324f9 Mon Sep 17 00:00:00 2001 From: kalyani chaudhari <138003080+misskalyani@users.noreply.github.com> Date: Thu, 4 Apr 2024 05:19:41 -0700 Subject: [PATCH 4/6] Add files via upload --- CPP PROJECT/Number guessing game.cpp | 156 +++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 CPP PROJECT/Number guessing game.cpp diff --git a/CPP PROJECT/Number guessing game.cpp b/CPP PROJECT/Number guessing game.cpp new file mode 100644 index 0000000..472224b --- /dev/null +++ b/CPP PROJECT/Number guessing game.cpp @@ -0,0 +1,156 @@ +#include +#include +#include +using namespace std; +void difficult() +{ + srand(time(0)); + int secret_Number = 1 + (rand() % 100); + int player_Choice; + cout << "\nYou have 5 choices for finding the secret number between 1 to 100."; + int choices_Left = 5; + for (int i = 1; i <= 5; i++) + { + cout << "\n\nEnter the number:"; + cin >> player_Choice; + if (player_Choice == secret_Number) + { + cout << "\n\nWell played! You won, "<< player_Choice<< " is the secret number\n"; + cout << "\t\t\t Thanks for playing....\n"; + cout << "\nPlay the game again with us!!\n\n\n"; + break; + } + else + { + cout << "\nOops, "<< player_Choice<< " is not the right number\n"; + if (player_Choice > secret_Number) + { + cout << "The secret number is smaller than the number you have chosen \n"; + } + else + { + cout << "The secret number is greater than the number you have chosen \n"; + } + choices_Left--; + cout << choices_Left << " choices left. \n"; + if (choices_Left == 0) + { + cout << "You couldn't find the secret number, it was"<< secret_Number<< ", You lose!!\n\n"; + cout << "Play the game again to win!!!\n\n"; + } + } + } +} +void medium() +{ + srand(time(0)); + int secret_Number = 1 + (rand() % 100); + int player_Choice; + cout << "\nYou have 7 choices for finding the secret number between 1 to 100."; + int choices_Left = 7; + for (int i = 1; i <= 7; i++) + { + cout << "\n\nEnter the number: "; + cin >> player_Choice; + if (player_Choice == secret_Number) + { + cout << "\n\nWell played! You won, "<< player_Choice<< " is the secret number\n"; + cout << "\t\t\t Thanks for playing....\n"; + cout << "Play the game again with us!!\n\n\n"; + break; + } + else + { + cout << "\nOops, " << player_Choice<< " is not the right number\n"; + if (player_Choice > secret_Number) + { + cout << "The secret number is smaller than the number you have chosen \n"; + } + else + { + cout << "The secret number is greater than the number you have chosen \n"; + } + choices_Left--; + cout << choices_Left << " choices left. \n"; + if (choices_Left == 0) + { + cout << "You couldn't find the secret number, it was"<< secret_Number<< ", You lose!!\n\n"; + cout << "Play the game again to win!!!\n\n"; + } + } + } +} +void easy() +{ + srand(time(0)); + int secret_Number = 1 + (rand() % 100); + int player_Choice; + cout << "\nYou have 10 choices for finding the secret number between 1 to 100."; + int choices_Left = 10; + for (int i = 1; i <= 10; i++) + { + cout << "\n\nEnter the number:"; + cin >> player_Choice; + if (player_Choice == secret_Number) + { + cout << "\n\nWell played! You won, "<< player_Choice<< " is the secret number\n"; + cout << "\t\t\t Thanks for playing....\n"; + cout << "Play the game again with us!!\n\n\n "; + break; + } + else + { + cout << "\nOops, " << player_Choice<< " is not the right number\n"; + if (player_Choice > secret_Number) + { + cout << "The secret number is smaller than the number you have chosen\n"; + } + else + { + cout << "The secret number is greater than the number you have chosen \n"; + } + choices_Left--; + cout << choices_Left << " choices left. \n"; + if (choices_Left == 0) + { + cout << "You couldn't find the secret number, it was"<< secret_Number<< ", You lose!!\n\n"; + cout << "Play the game again to win!!!\n\n"; + } + } + } +} +int main() +{ + int Choice; + cout << "\n\n\t\t\t\t\t \t\t\t\tWelcome to Guess The Number Game...!\n"; + cout << "\n \tYou have to guess a number between 1 to 100. "; + cout << "\n \tYou'll have limited choices based on the level you choose."; + cout << "\n \t\t\t\t\t\t\t\t\t\tGood Luck!\n\n"; + do + { + cout << "\n Level: \n\n"; + cout << "1 For easy\n"; + cout << "2 For medium\n"; + cout << "3 For difficult\n"; + cout << "0 For ending the game\n\n\n"; + cout << "Choose Level: "; + cin >>Choice; + switch(Choice) + { + + case 1: easy(); + break; + case 2: + medium(); + break; + case 3: + difficult(); + break; + case 0: + exit(0); + break; + } + }while(Choice<5); + return 0; +} + From 0f3cd92cb1aec26adbc54a38f1243a5633294aee Mon Sep 17 00:00:00 2001 From: kalyani chaudhari <138003080+misskalyani@users.noreply.github.com> Date: Sat, 27 Apr 2024 21:33:37 +0530 Subject: [PATCH 5/6] Delete CPP PROJECT/Number guessing game.cpp --- CPP PROJECT/Number guessing game.cpp | 156 --------------------------- 1 file changed, 156 deletions(-) delete mode 100644 CPP PROJECT/Number guessing game.cpp diff --git a/CPP PROJECT/Number guessing game.cpp b/CPP PROJECT/Number guessing game.cpp deleted file mode 100644 index 472224b..0000000 --- a/CPP PROJECT/Number guessing game.cpp +++ /dev/null @@ -1,156 +0,0 @@ -#include -#include -#include -using namespace std; -void difficult() -{ - srand(time(0)); - int secret_Number = 1 + (rand() % 100); - int player_Choice; - cout << "\nYou have 5 choices for finding the secret number between 1 to 100."; - int choices_Left = 5; - for (int i = 1; i <= 5; i++) - { - cout << "\n\nEnter the number:"; - cin >> player_Choice; - if (player_Choice == secret_Number) - { - cout << "\n\nWell played! You won, "<< player_Choice<< " is the secret number\n"; - cout << "\t\t\t Thanks for playing....\n"; - cout << "\nPlay the game again with us!!\n\n\n"; - break; - } - else - { - cout << "\nOops, "<< player_Choice<< " is not the right number\n"; - if (player_Choice > secret_Number) - { - cout << "The secret number is smaller than the number you have chosen \n"; - } - else - { - cout << "The secret number is greater than the number you have chosen \n"; - } - choices_Left--; - cout << choices_Left << " choices left. \n"; - if (choices_Left == 0) - { - cout << "You couldn't find the secret number, it was"<< secret_Number<< ", You lose!!\n\n"; - cout << "Play the game again to win!!!\n\n"; - } - } - } -} -void medium() -{ - srand(time(0)); - int secret_Number = 1 + (rand() % 100); - int player_Choice; - cout << "\nYou have 7 choices for finding the secret number between 1 to 100."; - int choices_Left = 7; - for (int i = 1; i <= 7; i++) - { - cout << "\n\nEnter the number: "; - cin >> player_Choice; - if (player_Choice == secret_Number) - { - cout << "\n\nWell played! You won, "<< player_Choice<< " is the secret number\n"; - cout << "\t\t\t Thanks for playing....\n"; - cout << "Play the game again with us!!\n\n\n"; - break; - } - else - { - cout << "\nOops, " << player_Choice<< " is not the right number\n"; - if (player_Choice > secret_Number) - { - cout << "The secret number is smaller than the number you have chosen \n"; - } - else - { - cout << "The secret number is greater than the number you have chosen \n"; - } - choices_Left--; - cout << choices_Left << " choices left. \n"; - if (choices_Left == 0) - { - cout << "You couldn't find the secret number, it was"<< secret_Number<< ", You lose!!\n\n"; - cout << "Play the game again to win!!!\n\n"; - } - } - } -} -void easy() -{ - srand(time(0)); - int secret_Number = 1 + (rand() % 100); - int player_Choice; - cout << "\nYou have 10 choices for finding the secret number between 1 to 100."; - int choices_Left = 10; - for (int i = 1; i <= 10; i++) - { - cout << "\n\nEnter the number:"; - cin >> player_Choice; - if (player_Choice == secret_Number) - { - cout << "\n\nWell played! You won, "<< player_Choice<< " is the secret number\n"; - cout << "\t\t\t Thanks for playing....\n"; - cout << "Play the game again with us!!\n\n\n "; - break; - } - else - { - cout << "\nOops, " << player_Choice<< " is not the right number\n"; - if (player_Choice > secret_Number) - { - cout << "The secret number is smaller than the number you have chosen\n"; - } - else - { - cout << "The secret number is greater than the number you have chosen \n"; - } - choices_Left--; - cout << choices_Left << " choices left. \n"; - if (choices_Left == 0) - { - cout << "You couldn't find the secret number, it was"<< secret_Number<< ", You lose!!\n\n"; - cout << "Play the game again to win!!!\n\n"; - } - } - } -} -int main() -{ - int Choice; - cout << "\n\n\t\t\t\t\t \t\t\t\tWelcome to Guess The Number Game...!\n"; - cout << "\n \tYou have to guess a number between 1 to 100. "; - cout << "\n \tYou'll have limited choices based on the level you choose."; - cout << "\n \t\t\t\t\t\t\t\t\t\tGood Luck!\n\n"; - do - { - cout << "\n Level: \n\n"; - cout << "1 For easy\n"; - cout << "2 For medium\n"; - cout << "3 For difficult\n"; - cout << "0 For ending the game\n\n\n"; - cout << "Choose Level: "; - cin >>Choice; - switch(Choice) - { - - case 1: easy(); - break; - case 2: - medium(); - break; - case 3: - difficult(); - break; - case 0: - exit(0); - break; - } - }while(Choice<5); - return 0; -} - From aff9f10b2f0174050873dbc2dd48f19dae95ac72 Mon Sep 17 00:00:00 2001 From: kalyani chaudhari <138003080+misskalyani@users.noreply.github.com> Date: Sat, 27 Apr 2024 21:33:49 +0530 Subject: [PATCH 6/6] Delete CPP PROJECT directory --- CPP PROJECT/Calculator.cpp | 85 -------------------------------------- 1 file changed, 85 deletions(-) delete mode 100644 CPP PROJECT/Calculator.cpp diff --git a/CPP PROJECT/Calculator.cpp b/CPP PROJECT/Calculator.cpp deleted file mode 100644 index 9dc5de9..0000000 --- a/CPP PROJECT/Calculator.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include -using namespace std; -int add(int a,int b) -{ - return a+b; -} -int sub(int a,int b) -{ - return a-b; -} -int mul(int a,int b) -{ - return a*b; -} -int div(int a,int b) -{ - return a/b; -} -int main() -{ - int a,b,ch; - cout<<"\n\n\t\t\t\t\t\t My Simple Calculator \n"; - cout<<"\n 1. Addition : "; - cout<<"\n 2. Subtraction : "; - cout<<"\n 3. Multiplication : "; - cout<<"\n 4. Division : "; - do - { - cout<<"\n\nSelect Opertation :: "; - cin>>ch; - switch(ch) - { - case 1: - cout<<"\n\nEnter First Number :: "; - cin>>a; - cout<<"\nEnter Second Number :: "; - cin>>b; - cout<<"\n"; - cout<>a; - cout<<"\nEnter Second Number :: "; - cin>>b; - cout<<"\n"; - cout<>a; - cout<<"\nEnter Second Number :: "; - cin>>b; - cout<<"\n"; - cout<>a; - cout<<"\nEnter Second Number :: "; - cin>>b; - cout<<"\n"; - cout<