16 |
17 | **NoteNote:**
18 | - Give a STAR if you like this
19 | - FORK to get more update
20 | - Make a PULL REQUEST to countribute
21 |
22 |
--------------------------------------------------------------------------------
/Tutorials/README.md:
--------------------------------------------------------------------------------
1 | # About Tutorial
2 |
3 | 
4 |
5 |
6 |
7 | You can access a wide range of tutorials directly within our dedicated mobile application,
8 | which is designed to cater to both Android and iOS users.
9 |
10 | - The app provides a user-friendly interface and an extensive collection of tutorials that cover various subjects.
11 | - Whether you're looking to enhance your skills, learn new techniques, or explore different topics, our app has got you covered.
12 | - To begin your learning C/C++ Programming journey, simply click here to initiate the app download process.
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Projects/C++ Projects/Basic/Calculate CGPA and GPA/README.md:
--------------------------------------------------------------------------------
1 | # A C++ program to calculate CGPA and GPA
2 |
3 | As a college student, it’s important to keep track of your academic performance, and one of the key metrics used to measure your progress is your Cumulative Grade Point Average (CGPA).
4 |
5 |
6 | Calculating CGPA can be a time-consuming and complex task, especially if you have taken multiple courses with varying credit load and grading systems. However, with the help of a CGPA calculator, the process can be much simpler and more efficient.
7 |
8 |
9 |
10 |
11 | INFO
12 |
13 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Nemonet The Young Programmer (TYP)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Projects/C++ Projects/Basic/Encryption and Decryption of Text/main.cpp:
--------------------------------------------------------------------------------
1 | // Autor : Nemonet TYP
2 | // Title: Encryption and Decryption project in C++
3 | // PROJECT FOR C/C++ PROGRAMMING TUTORIAL
4 |
5 |
6 | #include
7 | using namespace std;
8 |
9 | int main()
10 | {
11 | int i, x;
12 | char str[100];
13 |
14 | cout << "Please enter a string:\t";
15 | cin >> str;
16 |
17 | cout << "\nPlease choose following options:\n";
18 | cout << "1 = Encrypt the string.\n";
19 | cout << "2 = Decrypt the string.\n";
20 | cin >> x;
21 |
22 | //using switch case statements
23 | switch(x)
24 | {
25 | //first case for encrypting a string
26 | case 1:
27 | for(i = 0; (i < 100 && str[i] != '\0'); i++)
28 | str[i] = str[i] + 2; //the key for encryption is 3 that is added to ASCII value
29 |
30 | cout << "\nEncrypted string: " << str << endl;
31 | break;
32 |
33 | //second case for decrypting a string
34 | case 2:
35 | for(i = 0; (i < 100 && str[i] != '\0'); i++)
36 | str[i] = str[i] - 2; //the key for encryption is 3 that is subtracted to ASCII value
37 |
38 | cout << "\nDecrypted string: " << str << endl;
39 | break;
40 |
41 | default:
42 | cout << "\nInvalid Input !!!\n";
43 | }
44 | return 0;
45 | }
46 |
--------------------------------------------------------------------------------
/Tutorials/C++ Basic Tutorials/Simple Programs/STRUCTURE/Enumeration Program List.md:
--------------------------------------------------------------------------------
1 | # Enumeration Program List C++
2 |
3 | **Note:**
4 | - Give a STAR if you like this
5 | - FORK to get more update
6 | - Make a PULL REQUEST to countribute
7 |
8 |
9 |
10 |
11 |
12 |
13 | **NOTE**
14 | - Enum is a collection of named integer constant (i.e each element is assigned by integer value)
15 | - It is declared with enum keyword
16 |
17 |
18 |
19 |
20 |
21 | ```
22 |
23 | #include
24 | using namespace std;
25 | enum Age
26 | {
27 | Crystabel=21,
28 | Prosper=19,
29 | Iyosayi=18,
30 | Olaoluwa=23,
31 | Etinosa=24,
32 | Nemo=16
33 | };
34 | int main()
35 | {
36 | enum Age obj;
37 | obj=Etinosa;
38 | cout<<"The age of Etinosa="<
49 |
50 |
51 |
52 |
53 |
54 | **Note:**
55 | - This Tutorial is mainly Practical.
56 | - Give a STAR if you like this
57 | - FORK to get more update
58 | - Make a PULL REQUEST to countribute
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/Projects/C++ Projects/Basic/A Login and Registration System/README.md:
--------------------------------------------------------------------------------
1 | # A Login and Registration System Programmed in C++
2 |
3 | A login and registration system programmed in C++ that utilizes password hashing so nobody but the user is able to see the password.
4 |
5 | ## This program does the following:
6 |
7 | - Allows users to register a username, password, and security question into a database (text file)
8 | - Once registered, the user's password and security question will be hashed and nobody but the user will be able to know their password/security question
9 | - Using the text file, the user can login using their username and password
10 | - Once logged in, the user has a special game they may play
11 | - If a user forgets their password, there is a forget password option for the user which will ask for their username, and if it exists, the security question will be asked for.
12 | If the answer matches with what is in the database, the user will be able to use a new password.
13 |
14 |
15 |
16 |
17 |
18 | INFO
19 |
20 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Projects/C++ Projects/Basic/Guessing Game/text.cpp:
--------------------------------------------------------------------------------
1 | //created by The Young Programmer 🏅aka NemoNet 🖥
2 |
3 | #include
4 | using namespace std;
5 | int main()
6 | {
7 | int attemp = 1,ans,guess=0,_won=0,h=100,l=0;
8 | srand(time(0));
9 | ans = rand() % 100;
10 | cout<<"**** PLEASE READ INSTRUCTION ****"<>guess;
20 | if(guess < 0 || guess > 100){
21 | cout<<"INVALID GUESS!!"< "<
26 | INFO
27 |
28 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/Projects/C Projects/Basic/Love-Calculator/main.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 |
5 | void enter_string(char* message, char* s, size_t s_size)
6 | {
7 | printf("%s", message);
8 | fgets(s, s_size, stdin);
9 | }
10 |
11 | int get_score(char* s)
12 | {
13 | char *end;
14 | for (end = s; *end != '\0'; ++end);
15 | --end;
16 |
17 | if (end == s)
18 | {
19 | printf("wrong Input\n");
20 | return -1;
21 | }
22 |
23 | int score = 0;
24 | char c;
25 | for(char* p = s; p != end; ++p)
26 | {
27 | c = *p;
28 | if(c == ' ') continue;
29 |
30 | c &= ~0x20;
31 |
32 | if(c >= 'A' && c <= 'Z')
33 | {
34 | score += c - '@';
35 | }
36 | else
37 | {
38 | printf("wrong Input\n");
39 | return -1;
40 | }
41 | }
42 | return score * 5 / (end - s);
43 | }
44 |
45 | int main()
46 | {
47 | int p,s1,s2;
48 | char name[1000];
49 |
50 | while(1)
51 | {
52 | do
53 | {
54 | enter_string("Enter The First Name: ", name, sizeof(name));
55 | s1 = get_score(name);
56 | } while (s1 == -1);
57 |
58 | do
59 | {
60 | enter_string("Enter The Second Name: ", name, sizeof(name));
61 | s2 = get_score(name);
62 | } while (s2 == -1);
63 |
64 | if(s2 > s1)
65 | {
66 | p = (s1 * 100) / s2;
67 | }
68 | else
69 | {
70 | p = (s2 * 100) / s1;
71 | }
72 |
73 | printf("The love Percentage is : %d %% \n",p);
74 | printf("\n pls Follow me 🌟 if you like this code 😊\n");
75 | }
76 | return 0;
77 | }
78 |
79 |
80 | /* created by NemoNet aka The Young Programmer 🏅
81 | in collaboration with tigertv 🐯
82 | pls kindly follow me on github OR
83 | give me a star 🌟 */
84 |
--------------------------------------------------------------------------------
/Tutorials/C++ Basic Tutorials/Simple Programs/STRUCTURE/Union Program List.md:
--------------------------------------------------------------------------------
1 | # Union Program List C++
2 |
3 | **Note:**
4 | - Give a STAR if you like this
5 | - FORK to get more update
6 | - Make a PULL REQUEST to countribute
7 |
8 |
9 |
10 |
11 |
12 |
13 | **NOTE**
14 | - Union is approximately same as structure but it does not support multiple value simultaneously
15 | - It supports only one value at a time
16 | - It always support last value
17 | - In given example only marks will be true because marks is the last value assigned to it
18 |
19 |
20 |
21 |
22 | ```
23 |
24 | #include
25 | #include
26 | using namespace std;
27 | union Student
28 | {
29 | char name[200];
30 | int rollno;
31 | float marks;
32 | };
33 | int main()
34 | {
35 | union Student obj;
36 | strcpy(obj.name,"Nemonet TYP");
37 | obj.rollno=205;
38 | obj.marks=85.4;
39 | cout<<"Name="<
54 |
55 |
56 |
57 |
58 |
59 | **Note:**
60 | - This Tutorial is mainly Practical.
61 | - Give a STAR if you like this
62 | - FORK to get more update
63 | - Make a PULL REQUEST to countribute
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/Projects/C++ Projects/Basic/A Login and Registration System/LoginAndRegistration.cpp:
--------------------------------------------------------------------------------
1 | // Autor : Nemonet TYP
2 | // Title: A Login and Registration System Programmed in C++
3 | // PROJECT FOR C/C++ PROGRAMMING TUTORIAL
4 |
5 |
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include "login.cpp"
15 | using namespace std;
16 |
17 | int main()
18 | {
19 | login userLogin;
20 | string userChoice;
21 | cout << "\t\t\t_____________________________________________\n\n\n";
22 | cout << "\t\t\t Welcome to the NEMO 2023 Login! \n\n";
23 | cout << "\t\t\t_________ Menu __________\n\n";
24 | cout << "\t | Press 1 to LOGIN |" << endl;
25 | cout << "\t | Press 2 to REGISTER |" << endl;
26 | cout << "\t | Press 3 if you forgot PASSWORD |" << endl;
27 | cout << "\t | Press 4 to EXIT |" << endl;
28 | cout << "\n\t\t\t Please Enter your choice: ";
29 | cin >> userChoice;
30 | cout << endl;
31 |
32 | if (userChoice == "1")
33 | {
34 | userLogin.Login();
35 | main();
36 | }
37 | else if (userChoice == "2")
38 | {
39 | userLogin.Registration();
40 | main();
41 | }
42 | else if (userChoice == "3")
43 | {
44 | userLogin.ForgotPassword();
45 | main();
46 | }
47 | else if (userChoice == "4")
48 | {
49 | cout << "\t\t\t Goodbye! \n\n";
50 | }
51 | else
52 | {
53 | system("cls");
54 | cout << "\t\t\t Please select from the options above\n";
55 | main();
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/Projects/C++ Projects/Advance (GUI)/Basic Calculator (GUI)/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | Basic Calculator in C++ (GUI)
4 |
5 |
6 | Basic Calculator in C++ (GUI)
7 |
8 |
9 |
10 |
11 |
12 | Basic Calculator in C++ (GUI) is a Calculator that can be used to perform all the basic arithmetical operations viz. addition, subtraction, multiplication and division.
13 |
14 | The calculator has a three dimensional shape, and so do all of its buttons. In other words, it looks like a real world, three-dimensional object rather than a two dimensional shape rendered in a program.
15 |
40 |
41 | - I will be using Code::Blocks in this Project, which I believe is a good place to start.
42 | - You can find the latest version of Codeblocks at http://www.codeblocks.org/.
43 | - Download the mingw-setup.exe file, which will install the text editor with a compiler.
44 |
45 |
download Project
46 |
47 | - Download the Basic Calculator ZIP file
48 | - run the `main.exe` file by double clicking it
49 |
50 |
51 |
52 |
5 |
6 | Hotel Booking Management System in C++
7 |
8 |
9 |
10 | 
11 |
12 |
13 |
14 |
15 |
16 |
17 | Simple Hotel Management System is based on the concept of managing the hotel room’s bookings and payments. In this system, there are no login features. The user can manage room bookings, customer records, view total allotted rooms, edit records, and make payments. This mini project contains limited but essential features.
18 |
19 |
20 |
21 |
22 |
23 | Features of this C++ language based project :
24 |
25 |
26 |
27 |
28 | - Book Rooms
29 | - View Customer Records
30 | - View rooms allotted
31 | - Edit Records
32 | - Delete Records
33 | - Make Payments
34 |
35 |
61 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/Projects/C++ Projects/Basic/Encryption and Decryption of Text/README.md:
--------------------------------------------------------------------------------
1 | # Simple Encryption and Decryption project in C++
2 |
3 | ### What is Cryptography?
4 |
5 | Cryptography is the study of a secure way of transmitting data from person to person, where the data is modified only to be understandable by the intended persons.
6 | In short, if we want to send data or messages securely, then we use cryptographic techniques to avoid the intervention of unwanted persons or systems.
7 |
8 | ## Code Explanation
9 |
10 | In the main function, we are using a switch-case to choose between encryption or decryption.
11 |
12 | - In encryption, we are adding an integer to the character so that it changed to the character of the new ASCII value.
13 |
14 |
15 | 
16 |
17 |
18 | - When it comes to decryption, we take the same encrypted text and then change it by subtracting the same integer.
19 |
20 |
21 | 
22 |
23 |
24 | ### The main() function :
25 |
26 | - Declaring the str variable of type ‘char’ to be encrypted or decrypted with a limit of 100 characters.
27 | - The program will take the string input from the user.
28 | - The choice of encrypting or decrypting of the string will be given to you.
29 | - A switch-case control statement is used to select from the Encryption or Decryption case. If selected other than 1 or 2 options then the console will display “Invalid Input !!!”.
30 |
31 |
32 |
33 |
34 | INFO
35 |
36 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/Projects/C Projects/Basic/Tic Tac Toe Game/README.md:
--------------------------------------------------------------------------------
1 | # Tic Tac Toe Game Development using C
2 |
3 | You have probably played the Tic-Tac-Toe game to pass time during school hours. It’s fun when you play with paper and pencil. Here, we have developed a mini project in C Tic Tac Toe game.
4 |
5 | It is the same noughts and crosses or the Xs and Os, the other names for Tic-Tac-Toe.
6 |
7 | ### Function Used:
8 |
9 | I have divided this project into many functions, and below is a list of those functions.
10 | I have only described the gotoxy function in detail.
11 | Just go through the source code once, and other functions used are simple and easy to understand.
12 |
13 |
14 | - **void menu()** – In this mini project, this function displays the menu or welcome screen of this project.
15 | - **void go(int n)**
16 | - **void start_game()**
17 | - **void check_draw()**
18 | - **void draw_board()**
19 | - **void player_first()**
20 | - **void put_X_O(char ch, int pos)** – This function puts one of the numerical character you input into the respective position in Tic-Tac-Toe.
21 |
22 | `For example:`
23 | if you are playing with X and you input 2, the X will go to first row – second column.
24 | If you want to place X in third row – first column, you have to enter 7.
25 | And, it is similar for the other positions.
26 |
27 | - **void gotoxy (int x, int y)** – You need to understand this function as it is one of the most important one used in Tic Tac Toe in C.
28 | This function allows you to print text in any place of the screen.
29 |
30 | ### Images:
31 |
32 | - Menu
33 |
34 | 
35 |
36 | - PPlaying with X
37 |
38 | 
39 |
40 | - Game Draw
41 |
42 | 
43 |
44 |
45 |
46 |
47 |
48 | INFO
49 |
50 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/Projects/C Projects/Basic/Modern Periodic Table/README.md:
--------------------------------------------------------------------------------
1 | # Modern Periodic Table in C
2 |
3 | The Modern Periodic Table project is a simple console application built without the use of graphics.
4 | It is developed using the C programming language for the purpose of storing name, symbol, atomic number, atomic weight, and some important properties
5 | as well as to display them as per requirement of the user.
6 |
7 |
8 | ### Purpose :
9 |
10 | This project will help you to understand file handling in C
11 | i.e. creating a file and accessing the stored data in the file, modifying and removing the stored data.
12 | It will also help you to understand the use of functions as well as different parameters of C programming language.
13 |
14 |
15 | ### The main functions used in designing the Modern Periodic Table project are:
16 |
17 | - **void add():** This function is used to input or add the information of new element to the program.
18 | - **void explor():** This function is used to explore the stored information in the file created.
19 | - **void mainscreen():** It is included in source code of project file in order to print the text style and to control its color.
20 | - **void mainscreen():** This function is used to print the main screen or menu of the project.
21 |
22 |
23 | ### The key features of Modern Periodic Table mini project in C are briefly described below:
24 |
25 | - **Storage of Element Information:** In the project, you can add any new element with its name, symbol, atomic number, atomic weight and its some important properties.
26 | When new element information is to be added to this Modern Periodic Table, you have to enter 1 in the main menu and input information in given format.
27 | These information are stored in file created on the hard disk of computer by program itself.
28 |
29 | - **Exploration of element Information:** Another main function of this project is to explore or to display the stored information.
30 | You can search an element by using any of the following method:
31 | - By name of element
32 | - By symbol of element
33 | - By atomic number of element
34 | - By atomic weight of element
35 |
36 | - If you press 3 in the main menu, the program will be terminated.
37 |
38 |
39 | ## Project Output Screens:
40 |
41 | - Welcome Screen
42 |
43 | 
44 |
45 | - Search Element
46 |
47 | 
48 |
49 | - Element Information
50 |
51 | 
52 |
53 |
54 |
55 |
56 | INFO
57 |
58 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/Projects/C++ Projects/Basic/ReadMe.md:
--------------------------------------------------------------------------------
1 |
2 | # Basic C++ Programming Projects
3 |
4 | This repository contains a collection of basic C++ programming projects aimed at beginners.
5 |
6 | Each project focuses on different aspects of C++ programming and is designed to help you improve your skills and understanding of the language.
7 |
8 |
9 |
28 |
29 | Feel free to explore these projects, modify them, and enhance them as you progress in your C++ programming journey.
30 |
31 | Each project includes its own set of instructions and code files to help you get started.
32 |
33 | Happy coding!
34 |
35 | ## Getting Started
36 |
37 | To get started with any of the projects, follow the instructions provided in the project readme
38 |
39 | Each project has its own folder containing the source code files, instructions, and any additional resources required.
40 |
41 | ## Contribution
42 |
43 | Contributions to this repository are welcome. If you have any improvements or new project ideas to add, feel free to submit a pull request.
44 |
45 | Please make sure to follow the contribution guidelines outlined in the repository.
46 |
47 | ## License
48 |
49 | This repository is licensed under the [MIT License](LICENSE). You are free to use, modify, and distribute the code as per the terms of the license.
50 |
51 | ## Acknowledgments
52 |
53 | The projects in this repository are inspired by various programming resources, online tutorials, and personal experiences.
54 |
55 | We acknowledge the efforts of the C++ programming community and the valuable learning resources they provide.
56 |
57 |
58 | ## NOTE
59 |
60 | If you have any questions or need assistance with any of the projects, feel free to reach out via the issue tracker. Enjoy learning and coding in C++!
61 |
--------------------------------------------------------------------------------
/Projects/C++ Projects/Basic/AIO Calculator/AIO calculator.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | using namespace std;
4 |
5 | //addition
6 | long double add(long double num1, long double num2)
7 | {
8 | long double result;
9 | {
10 | result = num1 + num2;
11 | }
12 | return result;
13 | }
14 | //subtraction
15 | long double sub(long double num1a, long double num2a)
16 | {
17 | long double resulta;
18 | {
19 | resulta = num1a - num2a;
20 | }
21 | return resulta;
22 | }
23 | //multiplication
24 | long double mltp(long double num1b, long double num2b)
25 | {
26 | long double resultb;
27 | {
28 | resultb = num1b * num2b;
29 | }
30 | return resultb;
31 | }
32 | //division
33 | long double dv(long double num1c, long double num2c)
34 | {
35 | long double resultc;
36 | {
37 | resultc = num1c / num2c;
38 | }
39 | return resultc;
40 | }
41 | //exponent
42 | long double power(long double base, long double exponent)
43 | {
44 | long double resultd = 1;
45 | for(long double i = 0; i < exponent; i++)
46 | {
47 | resultd = base * resultd;
48 | }
49 | return resultd;
50 | }
51 |
52 | int panel;
53 | long double a;
54 | long double b;
55 |
56 | void ctrl_panel()
57 | {
58 | cout << "Control Panel\n\nOperators: \n\n1.Addition\n2.Subtraction\n3.Multiplication\n4.Division\n5.Exponent\n6.Multiplication Table\n7.Celcius to Farenheit\n8.Farenheit to Celcius\n\n0.Back\n";
59 | cin >> panel;
60 | switch(panel)
61 | {
62 | case 0:
63 | return;
64 | break;
65 | case 1:
66 | cout << "Addition\n\nFirst Number: \n";
67 | cin >> a;
68 | cout << "Second Number: \n";
69 | cin >> b;
70 | cout << add(a, b) << endl << endl;
71 | break;
72 | case 2:
73 | cout << "Subtraction\n\nFirst Number: \n";
74 | cin >> a;
75 | cout << "Second Number: \n";
76 | cin >> b;
77 | cout << sub(a, b) << endl << endl;
78 | break;
79 | case 3:
80 | cout << "Multiplication\n\nFirst Number: \n";
81 | cin >> a;
82 | cout << "Second Number: \n";
83 | cin >> b;
84 | cout << mltp(a, b) << endl << endl;
85 | break;
86 | case 4:
87 | cout << "Division\n\nFirst Number: \n";
88 | cin >> a;
89 | cout << "Second Number: \n";
90 | cin >> b;
91 | cout << dv(a, b) << endl << endl;
92 | break;
93 | case 5:
94 | cout << "Exponent\n\nBase: \n";
95 | cin >> a;
96 | cout << "Power: \n";
97 | cin >> b;
98 | cout << power(a, b) << endl << endl;
99 | break;
100 | case 7:
101 | cout << "Celcius to Farenheit\n\nTemperature: \n";
102 | cin >> a;
103 | cout << a * 1.8 + 32 << "℉" << endl << endl;
104 | break;
105 | case 8:
106 | cout << "Farenheit to Celcius\n\nTemperature: \n";
107 | cin >> a;
108 | cout << (a - 32) * 5/9 << "℃" << endl << endl;
109 | break;
110 | case 6:
111 | cout << "Multiplication table\n\nPlease select a number you want to show the table of: \n";
112 | int num;
113 | cin >> num;
114 | int num2 = 0;
115 | cout << "Range: \n";
116 | int range;
117 | cin >> range;
118 |
119 | for(int i = 0; i < range; i++)
120 | {
121 | num2++;
122 | cout << num << " x " << num2 << " = " << num * num2 << endl << endl;
123 | }
124 | break;
125 | }
126 | }
127 |
128 | int main()
129 | {
130 | int choice;
131 | do
132 | {
133 | cout << "Welcone to NemoNet Calculator\n\n1.Enter\n0.Quit\n\n";
134 | cout << " contact NemoNet on: \n\nGitHub\n";
135 | cin >> choice;
136 |
137 | switch(choice)
138 | {
139 | case 1:
140 | ctrl_panel();
141 | break;
142 | case 0:
143 | return 0;
144 | break;
145 | }
146 | }
147 | while(choice != 0);
148 | }
149 |
--------------------------------------------------------------------------------
/Projects/README.md:
--------------------------------------------------------------------------------
1 | # How to Run the Projects
2 |
3 | **NOTE: We will be using Visual Studio Code.** Click here to download Visual Studio Code.
4 |
5 |
6 | ## C/C++ for Visual Studio Code
7 |
8 | C/C++ support for Visual Studio Code is provided by a **Microsoft C/C++ extension** to enable cross-platform C and C++ development on **Windows**, **Linux**, and **macOS**.
9 |
10 |
11 | 
12 |
13 |
14 |
15 | ### Install the extension
16 |
17 | - Open VS Code.
18 | - Select the Extensions view icon on the Activity bar or use the keyboard shortcut (`Ctrl+Shift+X`).
19 | - Search for `C++`.
20 | - Select Install.
21 | - After you install the extension, also search for **Code Runner extension** and install it.
22 |
23 |
24 | 
25 |
26 |
27 |
28 |
29 | ### Install a compiler
30 |
31 | C++ is a compiled language meaning your program's source code must be translated (compiled) before it can be run on your computer.
32 |
33 | The C/C++ extension does not include a C++ compiler or debugger. You will need to install these tools or use those already installed on your computer.
34 |
35 | Most Linux distributions have the `GNU Compiler Collection (GCC)` installed and macOS users can get the `Clang` tools with `Xcode`.
36 |
37 | #### Check if you have a compiler installed
38 |
39 | - Checking for the GCC compiler `g++`:
40 |
41 | `g++ --version`
42 |
43 | - Checking for the Clang compiler `clang`:
44 |
45 | `clang --version`
46 |
47 |
48 | **If you don't have a compiler installed**, we will describe how to install the Minimalist GNU for Windows (MinGW) C++ tools (compiler and debugger). MinGW is a popular, free toolset for Windows.
49 |
50 | If you are running VS Code on another platform, you can read the vlang/LLVM Compiler and Debugger (For-macOS) , which cover C++ configurations for **Linux** and **macOS**.
51 |
52 |
53 | ### Install MinGW-x64 (For Windows)
54 |
55 | - Follow the Installation instructions on the MSYS2 website to install `Mingw-w64`.
56 | - Make sure to run each required Start menu and `pacman` command.
57 | - Add the MinGW compiler to your path: follow the video below to do that
58 |
59 |
60 |
61 | ### Video Explanation on how to Run the whole process
62 |
63 | https://www.youtube.com/watch?v=7jil6-QRsH0
64 |
65 |
66 |
67 |
68 | #### Check your MinGW installation
69 |
70 | To check that your **Mingw-w64** tools are correctly installed and available, open a new Command Prompt and type:
71 |
72 | `gcc --version`
73 |
74 | `g++ --version`
75 |
76 | `gdb --version`
77 |
78 | If you don't see the expected output or g++ or gdb is not a recognized command, make sure your PATH entry matches the Mingw-w64 binary location where the compiler tools are located.
79 |
80 | **NOTE**
81 |
82 | Follow the video to know How to Install MinGW (MSYS2) and Run C, C++ program in VS Code for Windows
83 |
84 |
85 |
86 | ### PART FOR macOS
87 |
88 |
89 |
90 | ## Install Clang/LLVM compiler and debugger (For macOS)
91 |
92 |
93 |
94 | In this tutorial, you will learn to configure Visual Studio Code on macOS to use the Clang/LLVM compiler and debugger.
95 |
96 | ### Prerequisites
97 |
98 | To successfully complete this tutorial, you must do the following:
99 |
100 | - Install Visual Studio Code on macOS.
101 |
102 | - Install the C++ extension for VS Code. You can install the C/C++ extension by searching for `c++` in the Extensions view (`Ctrl+Shift+X`).
103 |
104 | 
105 |
106 | ### Ensure Clang is installed
107 |
108 | - **Clang** may already be installed on your Mac. To verify that it is, open a macOS Terminal window and enter the following command:
109 |
110 | `clang --version`
111 |
112 | - If Clang isn't installed, enter the following command to install the command line developer tools:
113 |
114 | `xcode-select --install`
115 |
116 | ### Video Explanation on how to Run the whole process
117 |
118 | https://www.youtube.com/watch?v=f0vVV4NPmjQ
119 |
120 |
121 |
122 |
123 |
124 |
125 | ## How to Contribute: [🔝](#contents)
126 |
127 | - Just fork the project and clone it into your machine
128 | - Then make your contribution and upload it to your fork repository
129 | - Then click on pull request
130 |
131 |
132 |
133 | ### Donates to Support
134 |
135 |
136 |
137 | **NOTE**
138 |
139 | If you face any issues kindly let us know
140 |
--------------------------------------------------------------------------------
/Projects/C++ Projects/Basic/Calculate CGPA and GPA/main.cpp:
--------------------------------------------------------------------------------
1 | /*This C++ PROGRAM is developed by NemonET TYP and
2 | special right is given to TEAM TYP for educational purpose */
3 | //Don't copy source code without permission
4 |
5 |
6 | #include
7 | #include
8 |
9 | using namespace std;
10 |
11 | void calculateGPA();
12 | void calculateCGPA();
13 | void method();
14 |
15 | int main()
16 | {
17 | system("cls");
18 | int input;
19 | cout<<"--------------------------------------------------------------------------"<>input;
31 | switch(input)
32 | {
33 | case 1:
34 | calculateGPA();
35 | break;
36 |
37 | case 2:
38 | calculateCGPA();
39 | break;
40 | case 3:
41 | method();
42 | break;
43 | case 4:
44 | exit(EXIT_SUCCESS);
45 | break;
46 | default:
47 | cout<<"You have entered wrong input.Try again!\n"<>q;
60 |
61 | float credit [q];
62 | float point [q];
63 |
64 | cout<>credit[i];
69 | cout<>point[i];
72 | cout<<"-----------------------------------\n\n"<>inmenu;
99 |
100 | switch(inmenu)
101 | {
102 | case 1:
103 | calculateGPA();
104 | break;
105 | case 2:
106 | main();
107 | break;
108 | case 3:
109 | exit(EXIT_SUCCESS);
110 |
111 | default:
112 | cout<<"\n\nYou have Entered Wrong Input!Please Choose Again!"<>l;
123 | cout<<"\n\n"<>semrs[i];
131 | cout<<"\n"<>inmenu;
150 |
151 | switch(inmenu)
152 | {
153 | case 1:
154 | calculateCGPA();
155 | break;
156 | case 2:
157 | main();
158 | break;
159 | case 3:
160 | exit(EXIT_SUCCESS);
161 |
162 | default:
163 | cout<<"\n\nYou have Entered Wrong Input!Please Choose Again!"<>inmenu;
183 |
184 | switch(inmenu)
185 | {
186 | case 1:
187 | main();
188 | break;
189 | case 2:
190 | exit(EXIT_SUCCESS);
191 |
192 | default:
193 | cout<<"\n\nYou have Entered Wrong Input!Please Choose Again!"<
7 | #include
8 | #include
9 | #include
10 |
11 | int board[10] = {2,2,2,2,2,2,2,2,2,2};
12 | int turn = 1,flag = 0;
13 | int player,comp;
14 |
15 | void menu();
16 | void go(int n);
17 | void start_game();
18 | void check_draw();
19 | void draw_board();
20 | void player_first();
21 | void put_X_O(char ch,int pos);
22 | COORD coord= {0,0}; // this is global variable
23 | //center of axis is set to the top left cornor of the screen
24 | void gotoxy(int x,int y)
25 | {
26 | coord.X=x;
27 | coord.Y=y;
28 | SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord);
29 | }
30 |
31 | void main()
32 | {
33 | system("cls");
34 | menu();
35 | getch();
36 |
37 | }
38 |
39 | void menu()
40 | {
41 | int choice;
42 | system("cls");
43 | printf("\n--------MENU--------");
44 | printf("\n1 : Play with X");
45 | printf("\n2 : Play with O");
46 | printf("\n3 : Exit");
47 | printf("\nEnter your choice:>");
48 | scanf("%d",&choice);
49 | turn = 1;
50 | switch (choice)
51 | {
52 | case 1:
53 | player = 1;
54 | comp = 0;
55 | player_first();
56 | break;
57 | case 2:
58 | player = 0;
59 | comp = 1;
60 | start_game();
61 | break;
62 | case 3:
63 | exit(1);
64 | default:
65 | menu();
66 | }
67 | }
68 |
69 | int make2()
70 | {
71 | if(board[5] == 2)
72 | return 5;
73 | if(board[2] == 2)
74 | return 2;
75 | if(board[4] == 2)
76 | return 4;
77 | if(board[6] == 2)
78 | return 6;
79 | if(board[8] == 2)
80 | return 8;
81 | return 0;
82 | }
83 |
84 | int make4()
85 | {
86 | if(board[1] == 2)
87 | return 1;
88 | if(board[3] == 2)
89 | return 3;
90 | if(board[7] == 2)
91 | return 7;
92 | if(board[9] == 2)
93 | return 9;
94 | return 0;
95 | }
96 |
97 | int posswin(int p)
98 | {
99 | // p==1 then X p==0 then O
100 | int i;
101 | int check_val,pos;
102 |
103 | if(p == 1)
104 | check_val = 18;
105 | else
106 | check_val = 50;
107 |
108 | i = 1;
109 | while(i<=9)//row check
110 | {
111 | if(board[i] * board[i+1] * board[i+2] == check_val)
112 | {
113 | if(board[i] == 2)
114 | return i;
115 | if(board[i+1] == 2)
116 | return i+1;
117 | if(board[i+2] == 2)
118 | return i+2;
119 | }
120 | i+=3;
121 | }
122 |
123 | i = 1;
124 | while(i<=3)//column check
125 | {
126 | if(board[i] * board[i+3] * board[i+6] == check_val)
127 | {
128 | if(board[i] == 2)
129 | return i;
130 | if(board[i+3] == 2)
131 | return i+3;
132 | if(board[i+6] == 2)
133 | return i+6;
134 | }
135 | i++;
136 | }
137 |
138 | if(board[1] * board[5] * board[9] == check_val)
139 | {
140 | if(board[1] == 2)
141 | return 1;
142 | if(board[5] == 2)
143 | return 5;
144 | if(board[9] == 2)
145 | return 9;
146 | }
147 |
148 | if(board[3] * board[5] * board[7] == check_val)
149 | {
150 | if(board[3] == 2)
151 | return 3;
152 | if(board[5] == 2)
153 | return 5;
154 | if(board[7] == 2)
155 | return 7;
156 | }
157 | return 0;
158 | }
159 |
160 | void go(int n)
161 | {
162 | if(turn % 2)
163 | board[n] = 3;
164 | else
165 | board[n] = 5;
166 | turn++;
167 | }
168 |
169 | void player_first()
170 | {
171 | int pos;
172 |
173 | check_draw();
174 | draw_board();
175 | gotoxy(30,18);
176 | printf("Your Turn :> ");
177 | scanf("%d",&pos);
178 |
179 | if(board[pos] != 2)
180 | player_first();
181 |
182 | if(pos == posswin(player))
183 | {
184 | go(pos);
185 | draw_board();
186 | gotoxy(30,20);
187 | //textcolor(128+RED);
188 | printf("Player Wins");
189 | getch();
190 | exit(0);
191 | }
192 |
193 | go(pos);
194 | draw_board();
195 | start_game();
196 | }
197 |
198 | void start_game()
199 | {
200 | // p==1 then X p==0 then O
201 | if(posswin(comp))
202 | {
203 | go(posswin(comp));
204 | flag = 1;
205 | }
206 | else if(posswin(player))
207 | go(posswin(player));
208 | else if(make2())
209 | go(make2());
210 | else
211 | go(make4());
212 | draw_board();
213 |
214 | if(flag)
215 | {
216 | gotoxy(30,20);
217 | //textcolor(128+RED);
218 | printf("Computer wins");
219 | getch();
220 | }
221 | else
222 | player_first();
223 | }
224 |
225 | void check_draw()
226 | {
227 | if(turn > 9)
228 | {
229 | gotoxy(30,20);
230 | //textcolor(128+RED);
231 | printf("Game Draw");
232 | getch();
233 | exit(0);
234 | }
235 | }
236 |
237 | void draw_board()
238 | {
239 | int j;
240 |
241 | for(j=9; j<17; j++)
242 | {
243 | gotoxy(35,j);
244 | printf("| |");
245 | }
246 | gotoxy(28,11);
247 | printf("-----------------------");
248 | gotoxy(28,14);
249 | printf("-----------------------");
250 |
251 | for(j=1; j<10; j++)
252 | {
253 | if(board[j] == 3)
254 | put_X_O('X',j);
255 | else if(board[j] == 5)
256 | put_X_O('O',j);
257 | }
258 | }
259 |
260 | void put_X_O(char ch,int pos)
261 | {
262 | int m;
263 | int x = 31, y = 10;
264 |
265 | m = pos;
266 |
267 | if(m > 3)
268 | {
269 | while(m > 3)
270 | {
271 | y += 3;
272 | m -= 3;
273 | }
274 | }
275 | if(pos % 3 == 0)
276 | x += 16;
277 | else
278 | {
279 | pos %= 3;
280 | pos--;
281 | while(pos)
282 | {
283 | x+=8;
284 | pos--;
285 | }
286 | }
287 | gotoxy(x,y);
288 | printf("%c",ch);
289 | }
290 |
--------------------------------------------------------------------------------
/Tutorials/C++ Basic Tutorials/Simple Programs/BASIC/Basic Program List.md:
--------------------------------------------------------------------------------
1 | # Basic C++ Program List
2 |
3 | **Note:**
4 | - Give a STAR if you like this
5 | - FORK to get more update
6 | - Make a PULL REQUEST to countribute
7 |
8 |
9 |
10 | *Put your phone in desktop mode for easy access*
11 |
12 |
13 |
14 |
15 |
16 |
17 | ADDITION OF TWO NUMBER
18 |
19 | ```
20 |
21 | #include
22 | using namespace std;
23 | int main()
24 | {
25 | int a,b,c;
26 | cout<<"Enter first number\n";
27 | cin>>a;
28 | cout<<"Enter second number\n";
29 | cin>>b;
30 | c=a+b;
31 | cout<<"Add="<
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | SUBTRACTION OF TWO NUMBER
46 |
47 | ```
48 |
49 | #include
50 | using namespace std;
51 | int main()
52 | {
53 | int a,b,c;
54 | cout<<"Enter first number\n";
55 | cin>>a;
56 | cout<<"Enter second number\n";
57 | cin>>b;
58 | c=a-b;
59 | cout<<"Sub="<
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | MULTIPLICATION OF TWO NUMBER
74 |
75 | ```
76 |
77 | #include
78 | using namespace std;
79 | int main()
80 | {
81 | int a,b,c;
82 | cout<<"Enter first number\n";
83 | cin>>a;
84 | cout<<"Enter second number\n";
85 | cin>>b;
86 | c=a*b;
87 | cout<<"Multiply="<
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 | DIVISION OF TWO NUMBER
101 |
102 | ```
103 |
104 | #include
105 | using namespace std;
106 | int main()
107 | {
108 | int a,b,c;
109 | cout<<"Enter first number\n";
110 | cin>>a;
111 | cout<<"Enter second number\n";
112 | cin>>b;
113 | c=a/b;
114 | cout<<"Div="<
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 | AREA OF RECTANGLE
130 |
131 | ```
132 |
133 | #include
134 | using namespace std;
135 | int main()
136 | {
137 | int area,h,w;
138 | cout<<"Enter height of rectangle\n";
139 | cin>>h;
140 | cout<<"Enter width of rectangle\n";
141 | cin>>w;
142 | area=h*w;
143 | cout<<"Area of rectangle="<
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 | AREA OF SQUARE
158 |
159 | ```
160 |
161 | #include
162 | using namespace std;
163 | int main()
164 | {
165 | int area,side;
166 | cout<<"Enter side of square\n";
167 | cin>>side;
168 | area=side*side;
169 | cout<<"Area of square="<
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 | AREA OF CIRCLE
185 |
186 | ```
187 |
188 | #include
189 | using namespace std;
190 | int main()
191 | {
192 | float area,r;
193 | cout<<"Enter radius of circle\n";
194 | cin>>r;
195 | area=3.14*r*r;
196 | cout<<"Area of circle="<
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 | AREA OF TRIANGLE
213 |
214 | ```
215 |
216 | #include
217 | using namespace std;
218 | int main()
219 | {
220 | float area,b,h;
221 | cout<<"Enter base\n";
222 | cin>>b;
223 | cout<<"Enter height\n";
224 | cin>>h;
225 | area=0.5*b*h;
226 | cout<<"Area of triangle="<
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 | INPUT MARKS OF 5SUBJECT AND FIND THERE AVERAGE
242 |
243 | **Note** Let each subject be Physics=p, Chemistry=c, Math=m, Geography=g, English=e
244 |
245 | ```
246 |
247 | #include
248 | using namespace std;
249 | int main()
250 | {
251 | float p,c,m,g,e,avg;
252 | cout<<"Enter marks in physics\n";
253 | cin>>p;
254 | cout<<"Enter marks in chemistry\n";
255 | cin>>c;
256 | cout<<"Enter marks in math\n";
257 | cin>>m;
258 | cout<<"Enter marks in geography\n";
259 | cin>>g;
260 | cout<<"Enter marks in english\n";
261 | cin>>e;
262 | avg=(p+c+m+g+e)/5;
263 | cout<<"Average of result="<
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 | SIMPLE INTEREST PROGRAM
278 |
279 | ```
280 |
281 | #include
282 | using namespace std;
283 | int main()
284 | {
285 | float p,r,t,si;
286 | cout<<"Enter principle\n";
287 | cin>>p;
288 | cout<<"Enter rate of interest\n";
289 | cin>>r;
290 | cout<<"Enter time\n";
291 | cin>>t;
292 | si=(p*r*t)/100;
293 | cout<<"Simple Interest="<
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
--------------------------------------------------------------------------------
/Tutorials/C++ Basic Tutorials/Simple Programs/LOOP/WHILE LOOP/While Loop Program List.md:
--------------------------------------------------------------------------------
1 | # While Loop Program List
2 |
3 | **Note:**
4 | - Give a STAR if you like this
5 | - FORK to get more update
6 | - Make a PULL REQUEST to countribute
7 |
8 |
9 |
10 | *Put your phone in desktop mode for easy access*
11 |
12 |
13 |
14 |
15 |
16 |
17 | TABLE OF ONE
18 |
19 | ```
20 |
21 | #include
22 | using namespace std;
23 | int main()
24 | {
25 | int i=1;
26 | while(i<=10)
27 | {
28 | cout<
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | PRINT DIGITS OF INTEGER VALUE IN REVERSE ORDER
60 |
61 | ```
62 |
63 | #include
64 | using namespace std;
65 | int main()
66 | {
67 | int no,b;
68 | cout<<"Enter any number\n";
69 | cin>>no;
70 | cout<<"Revere is given below\n";
71 | while(no!=0)
72 | {
73 | b=no%10;
74 | cout<
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 | CHECK NUMBER IS PALINDROME OR NOT
100 |
101 | ```
102 |
103 | #include
104 | using namespace std;
105 | int main()
106 | {
107 | int no,b,rev=0,cpy;
108 | cout<<"Enter any number\n";
109 | cin>>no;
110 | cpy=no;
111 | while(no!=0)
112 | {
113 | b=no%10;
114 | rev=rev*10+b;
115 | no=no/10;
116 | }
117 | if(rev==cpy)
118 | cout<<"Palindrome";
119 | else
120 | cout<<"Not Palindrome";
121 | }
122 |
123 |
124 | /*
125 | ### Output ###
126 | Enter any number
127 | 5885
128 | Palindrome
129 | */
130 |
131 | ```
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 | FIND SUM OF DIGITS OF INTEGER VALUE
142 |
143 | ```
144 |
145 | #include
146 | using namespace std;
147 | int main()
148 | {
149 | int no,b,sum=0;
150 | cout<<"Enter any number\n";
151 | cin>>no;
152 | while(no!=0)
153 | {
154 | b=no%10;
155 | sum=sum+b;
156 | no=no/10;
157 | }
158 | cout<<"Total sum of digits="<
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 | MULTIPLY OF DIGITS OF INTEGER NUMBER
181 |
182 | ```
183 |
184 | #include
185 | using namespace std;
186 | int main()
187 | {
188 | int no,b,m=1;
189 | cout<<"Enter any number\n";
190 | cin>>no;
191 | while(no!=0)
192 | {
193 | b=no%10;
194 | m=m*b;
195 | no=no/10;
196 | }
197 | cout<<"Total multiply of digits="<
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 | PRINT FIRST AND LAST DIGIT OF INTEGER NUMBER
221 |
222 | ```
223 |
224 | #include
225 | using namespace std;
226 | int main()
227 | {
228 | int no,b,last;
229 | cout<<"Enter any number\n";
230 | cin>>no;
231 | last=no%10;
232 | while(no!=0)
233 | {
234 | b=no%10;
235 | no=no/10;
236 | }
237 | cout<<"First digit="<>no;
271 | copy=no;
272 | while(no!=0)
273 | {
274 | b=no%10;
275 | sum=sum+(b*b*b);
276 | no=no/10;
277 | }
278 | if(copy==sum)
279 | cout<<"Number is Armstrong";
280 | else
281 | cout<<"Number is not Armstrong";
282 | }
283 |
284 |
285 | /*
286 | ### Output ###
287 | Enter any number
288 | 153
289 | Number is Armstrong
290 | */
291 |
292 | ```
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 | **Note:**
304 | - Give a STAR if you like this
305 | - FORK to get more update
306 | - Make a PULL REQUEST to countribute
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
--------------------------------------------------------------------------------
/Tutorials/C++ Basic Tutorials/Simple Programs/LOOP/DO WHILE LOOP/Do While Loop Program List.md:
--------------------------------------------------------------------------------
1 | # Do While Loop Program List
2 |
3 | **Note:**
4 | - Give a STAR if you like this
5 | - FORK to get more update
6 | - Make a PULL REQUEST to countribute
7 |
8 |
9 |
10 | *Put your phone in desktop mode for easy access*
11 |
12 |
13 |
14 |
15 |
16 |
17 | TABLE OF ONE
18 |
19 | ```
20 |
21 | #include
22 | using namespace std;
23 | int main()
24 | {
25 | int i=1;
26 | do
27 | {
28 | printf("%d\n",i);
29 | i++;
30 | }
31 | while(i<=10);
32 | }
33 |
34 |
35 | /*
36 | ### Output ###
37 | 1
38 | 2
39 | 3
40 | 4
41 | 5
42 | 6
43 | 7
44 | 8
45 | 9
46 | 10
47 | */
48 |
49 | ```
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | PRINT DIGITS OF INTEGER VALUE IN REVERSE ORDER
61 |
62 | ```
63 |
64 | #include
65 | using namespace std;
66 | int main()
67 | {
68 | int no,b;
69 | cout<<"Enter any number\n";
70 | cin>>no;
71 | cout<<"Revere is given below\n";
72 | do
73 | {
74 | b=no%10;
75 | cout<
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 | CHECK NUMBER IS PALINDROME OR NOT
102 |
103 | ```
104 |
105 | #include
106 | using namespace std;
107 | int main()
108 | {
109 | int no,b,rev=0,cpy;
110 | cout<<"Enter any number\n";
111 | cin>>no;
112 | cpy=no;
113 | do
114 | {
115 | b=no%10;
116 | rev=rev*10+b;
117 | no=no/10;
118 | }
119 | while(no!=0)
120 | if(cpy==rev)
121 | cout<<"Palindrome";
122 | else
123 | cout<<"Not Palindrome";
124 | }
125 |
126 |
127 | /*
128 | ### Output ###
129 | Enter any number
130 | 5885
131 | Palindrome
132 | */
133 |
134 | ```
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 | FIND SUM OF DIGITS OF INTEGER VALUE
145 |
146 | ```
147 |
148 | #include
149 | using namespace std;
150 | int main()
151 | {
152 | int no,b,sum=0;
153 | cout<<"Enter any number\n";
154 | cin>>no;
155 | do
156 | {
157 | b=no%10;
158 | sum=sum+b;
159 | no=no/10;
160 | }
161 | while(no!=0);
162 | cout<<"Total sum of digits="<
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 | MULTIPLY OF DIGITS OF INTEGER NUMBER
185 |
186 | ```
187 |
188 | #include
189 | using namespace std;
190 | int main()
191 | {
192 | int no,b,m=1;
193 | cout<<"Enter any number\n";
194 | cin>>no;
195 | do
196 | {
197 | b=no%10;
198 | m=m*b;
199 | no=no/10;
200 | }
201 | while(no!=0)
202 | cout<<"Total multiply of digits="<
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 | PRINT FIRST AND LAST DIGIT OF INTEGER NUMBER
226 |
227 | ```
228 |
229 | #include
230 | using namespace std;
231 | int main()
232 | {
233 | int no,b,f;
234 | cout<<"Enter any number\n";
235 | cin>>no;
236 | last=no%10;
237 | do
238 | {
239 | b=no%10;
240 | no=no/10;
241 | }
242 | while(no!=0);
243 | cout<<"First digit="<>no;
277 | copy=no;
278 | do
279 | {
280 | b=no%10;
281 | sum=sum+(b*b*b);
282 | no=no/10;
283 | }
284 | while(no!=0)
285 | if(copy==sum)
286 | cout<<"Number is Armstrong";
287 | else
288 | cout<<"Number is not Armstrong";
289 | }
290 |
291 |
292 | /*
293 | ### Output ###
294 | Enter any number
295 | 153
296 | Number is Armstrong
297 | */
298 |
299 | ```
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
368 |
369 | **Note:**
370 | - Give a STAR if you like this
371 | - FORK to get more update
372 | - Make a PULL REQUEST to countribute
373 |
--------------------------------------------------------------------------------
/Tutorials/C++ Basic Tutorials/Simple Programs/STRUCTURE/Structure Program List.md:
--------------------------------------------------------------------------------
1 | # Structured Program List C++
2 |
3 | **Note:**
4 | - Give a STAR if you like this
5 | - FORK to get more update
6 | - Make a PULL REQUEST to countribute
7 |
8 |
363 |
364 |
365 |
366 | **Note:**
367 | - This Tutorial is mainly Practical.
368 | - Give a STAR if you like this
369 | - FORK to get more update
370 | - Make a PULL REQUEST to countribute
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
--------------------------------------------------------------------------------
/Projects/C++ Projects/Basic/Hotel Management System/main.cpp:
--------------------------------------------------------------------------------
1 | //DEVELOPED BY Nemonet TYP
2 |
3 | //C++ PROJECT
4 |
5 | //START OF THE PROGRAM FOR HOTEL MANAGEMENT
6 |
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 |
14 | using namespace std;
15 |
16 | //START OF CLASS
17 |
18 |
19 |
20 | class hotel
21 | {
22 |
23 | int room_no;
24 | char name[30];
25 | char address[50];
26 | char phone[10];
27 |
28 | public:
29 |
30 | void main_menu(); //to display the main menu
31 | void add(); //to book a room
32 | void display(); //to display the customer record
33 | void rooms(); //to display alloted rooms
34 | void edit(); //to edit the customer record
35 | int check(int); //to check room status
36 | void modify(int); //to modify the record
37 | void delete_rec(int); //to delete the record
38 | void bill(int); //for the bill of a record
39 | };
40 | //END OF CLASS
41 |
42 |
43 |
44 | //FOR DISPLAYING MAIN MENU
45 |
46 |
47 |
48 | void hotel::main_menu()
49 | {
50 |
51 | int choice;
52 | while(choice!=5)
53 | {
54 |
55 | system("cls");
56 | cout<<"\n\t\t\t\t**************************";
57 | cout<<"\n\t\t\t\t SIMPLE HOTEL MANAGEMENT ";
58 | cout<<"\n\t\t\t\t * MAIN MENU *";
59 | cout<<"\n\t\t\t\t**************************";
60 | cout<<"\n\n\n\t\t\t1.Book A Room";
61 | cout<<"\n\t\t\t2.Customer Records";
62 | cout<<"\n\t\t\t3.Rooms Allotted";
63 | cout<<"\n\t\t\t4.Edit Record";
64 | cout<<"\n\t\t\t5.Exit";
65 | cout<<"\n\n\t\t\tEnter Your Choice: ";
66 | cin>>choice;
67 |
68 | switch(choice)
69 | {
70 |
71 | case 1: add();
72 | break;
73 |
74 | case 2: display();
75 | break;
76 |
77 | case 3: rooms();
78 | break;
79 |
80 | case 4: edit();
81 | break;
82 |
83 | case 5: break;
84 |
85 | default:
86 | {
87 |
88 | cout<<"\n\n\t\t\tWrong choice.....!!!";
89 | cout<<"\n\t\t\tPress any key to continue....!!";
90 | getch();
91 |
92 | }
93 |
94 | }
95 |
96 | }
97 |
98 | }
99 |
100 |
101 | //END OF MENU FUNCTION
102 |
103 |
104 | //FUNCTION FOR BOOKING OF ROOM
105 |
106 |
107 | void hotel::add()
108 | {
109 |
110 | system("cls");
111 | int r,flag;
112 | ofstream fout("Record.dat",ios::app);
113 |
114 | cout<<"\n Enter Customer Detalis";
115 | cout<<"\n -----------------------";
116 | cout<<"\n\n Room no: ";
117 | cout<<"\n Total no. of Rooms - 50";
118 | cout<<"\n Ordinary Rooms from 1 - 30";
119 | cout<<"\n Luxury Rooms from 31 - 45";
120 | cout<<"\n Royal Rooms from 46 - 50";
121 | cout <<"\n Enter The Room no. you want to stay in :- "<<'\n';
122 | cin>>r;
123 |
124 | flag=check(r);
125 |
126 | if(flag)
127 | cout<<"\n Sorry..!!!Room is already booked";
128 |
129 | else
130 | {
131 |
132 | room_no=r;
133 | cout<<" Name: ";
134 | cin>>name;
135 | cout<<" Address: ";
136 | cin>>address;
137 | cout<<" Phone No: ";
138 | cin>>phone;
139 |
140 | fout.write((char*)this,sizeof(hotel));
141 | cout<<"\n Room is booked...!!!";
142 |
143 | }
144 |
145 | cout<<"\n Press any key to continue.....!!";
146 |
147 | getch();
148 | fout.close();
149 |
150 | }
151 |
152 |
153 | //END OF BOOKING FUNCTION
154 |
155 |
156 | //FUNCTION FOR DISPLAYING A PURTICULAR CUSTOMER`S RECORD
157 |
158 |
159 |
160 |
161 |
162 | void hotel::display()
163 | {
164 |
165 | system("cls");
166 |
167 | ifstream fin("Record.dat",ios::in);
168 | int r,flag;
169 |
170 | cout<<"\n Enter room No. for a particular customer`s details :- "<<'\n';
171 | cin>>r;
172 |
173 | while(!fin.eof())
174 | {
175 |
176 | fin.read((char*)this,sizeof(hotel));
177 | if(room_no==r)
178 | {
179 |
180 | system("cls");
181 | cout<<"\n Customer Details";
182 | cout<<"\n -----------------";
183 | cout<<"\n\n Room no: "<>choice;
251 | system("cls");
252 |
253 | cout<<"\n Enter room no: " ;
254 | cin>>r;
255 |
256 | switch(choice)
257 | {
258 |
259 | case 1: modify(r);
260 | break;
261 |
262 | case 2: delete_rec(r);
263 | break;
264 |
265 | case 3: bill(r);
266 | break;
267 |
268 | default: cout<<"\n Wrong Choice.....!!";
269 |
270 | }
271 | cout<<"\n Press any key to continue....!!!";
272 |
273 | getch();
274 | }
275 |
276 |
277 | int hotel::check(int r)
278 | {
279 |
280 | int flag=0;
281 |
282 | ifstream fin("Record.dat",ios::in);
283 |
284 | while(!fin.eof())
285 | {
286 |
287 | fin.read((char*)this,sizeof(hotel));
288 | if(room_no==r)
289 | {
290 |
291 | flag=1;
292 | break;
293 |
294 | }
295 |
296 | }
297 |
298 | fin.close();
299 | return(flag);
300 |
301 | }
302 |
303 |
304 | //FUNCTION TO MODIFY CUSTOMERS RECORD
305 |
306 |
307 | void hotel::modify(int r)
308 | {
309 |
310 | long pos,flag=0;
311 |
312 | fstream file("Record.dat",ios::in|ios::out|ios::binary);
313 |
314 | while(!file.eof())
315 | {
316 |
317 | pos=file.tellg();
318 | file.read((char*)this,sizeof(hotel));
319 |
320 | if(room_no==r)
321 | {
322 |
323 | cout<<"\n Enter New Details";
324 | cout<<"\n ------------------";
325 | cout<<"\n Name: ";
326 | cin>>name;
327 | cout<<" Address: ";
328 | cin>>address;
329 | cout<<" Phone no: ";
330 | cin>>phone;
331 | file.seekg(pos);
332 | file.write((char*)this,sizeof(hotel));
333 | cout<<"\n Record is modified....!!";
334 | flag=1;
335 | break;
336 |
337 | }
338 |
339 | }
340 |
341 | if(flag==0)
342 | cout<<"\n Sorry Room No. not found or vacant...!!";
343 | file.close();
344 |
345 | }
346 |
347 |
348 | //END OF MODIFY FUNCTION
349 |
350 |
351 | //FUNCTION FOR DELETING RECORD
352 |
353 |
354 | void hotel::delete_rec(int r)
355 | {
356 |
357 | int flag=0;
358 | char ch;
359 | ifstream fin("Record.dat",ios::in);
360 | ofstream fout("temp.dat",ios::out);
361 |
362 | while(!fin.eof())
363 | {
364 |
365 | fin.read((char*)this,sizeof(hotel));
366 | if(room_no==r)
367 |
368 | {
369 |
370 | cout<<"\n Name: "<>ch;
375 |
376 | if(ch=='n')
377 | fout.write((char*)this,sizeof(hotel));
378 | flag=1;
379 |
380 | }
381 |
382 | else
383 | fout.write((char*)this,sizeof(hotel));
384 |
385 | }
386 |
387 | fin.close();
388 | fout.close();
389 |
390 | if(flag==0)
391 | cout<<"\n Sorry room No. not found or vacant...!!";
392 |
393 | else
394 | {
395 |
396 | remove("Record.dat");
397 | rename("temp.dat","Record.dat");
398 |
399 | }
400 |
401 | }
402 |
403 |
404 | //END OF DELETE FUNCTION
405 |
406 |
407 | //FUNCTION FOR CUSTOMER`S BILL
408 |
409 | void hotel::bill(int r)
410 | {
411 |
412 | hotel h1;
413 | ifstream f1;
414 | f1.open("record.dat",ios::in|ios::binary);
415 |
416 | if(!f1)
417 | cout<<"cannot open";
418 |
419 | else
420 | {
421 |
422 | f1.read((char*)&h1,sizeof (hotel));
423 | while(f1)
424 |
425 | {
426 |
427 | f1.read((char*)&h1,sizeof(hotel));
428 |
429 | }
430 |
431 | if (h1.room_no == r)
432 | {
433 |
434 | if(h1.room_no>=1&&h1.room_no<=30)
435 | cout<<"your bill = 2000";
436 |
437 | else if (h1.room_no>=35&&h1.room_no<=45)
438 | cout<<"your bill = 5000" ;
439 |
440 | else
441 | cout<<"your bill = 7000";
442 |
443 | }
444 |
445 | else
446 | { cout<<"room no. not found";}
447 |
448 | }
449 |
450 | f1.close();
451 | getch();
452 |
453 | }
454 |
455 | //END OF BILLING FUNCTION
456 |
457 | //START OF MAIN PROGARM
458 |
459 |
460 | int main()
461 | {
462 |
463 | hotel h;
464 |
465 | system("cls");
466 |
467 | cout<<"\n\t\t\t*****************************";
468 | cout<<"\n\t\t\t* HOTEL MANAGEMENT PROJECT *";
469 | cout<<"\n\t\t\t*****************************";
470 | cout<<"\n\n\t\tDeveloped By:";
471 | cout<<"\t\t Nemonet";
472 | cout<<"\n\t\t\t\t The Young Programmer (TYP)";
473 | cout<<"\n\n\n\n\n\n\n\t\t\t\t\tPress any key to continue....!!";
474 |
475 | getch();
476 |
477 | h.main_menu();
478 | return 0;
479 | }
480 |
481 | //END OF MAIN PROGRAM
482 |
--------------------------------------------------------------------------------
/Tutorials/C++ Basic Tutorials/Simple Programs/SWITCH/Switch Program List.md:
--------------------------------------------------------------------------------
1 | # Switch Program List in C++
2 |
3 | **Note:**
4 | - Give a STAR if you like this
5 | - FORK to get more update
6 | - Make a PULL REQUEST to countribute
7 |
8 |
9 |
10 | *Put your phone on Desktop mode for easy access*
11 |
12 |
13 |
14 |
15 |
16 |
17 | INPUT ANY NUMBER AND PRINT DAY OF WEEK
18 |
19 | ```
20 |
21 | #include
22 | using namespace std;
23 | int main()
24 | {
25 | int no;
26 | cout<<"Enter any number\n";
27 | cin>>no;
28 | switch(no)
29 | {
30 | case 1:
31 | cout<<"Monday";
32 | break;
33 | case 2:
34 | cout<<"Tuesday";
35 | break;
36 | case 3:
37 | cout<<"Wednesday";
38 | break;
39 | case 4:
40 | cout<<"Thursday";
41 | break;
42 | case 5:
43 | cout<<"Friday";
44 | break;
45 | case 6:
46 | cout<<"Saturday";
47 | break;
48 | case 7:
49 | cout<<"Sunday";
50 | break;
51 | default:
52 | cout<<"Invalid Input";
53 | }
54 | }
55 |
56 |
57 | /*
58 | ### Output ###
59 | Enter any number
60 | 2
61 | Tuesday
62 | */
63 |
64 | ```
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 | INPUT ANY NUMBER AND PRINT MONTH, NAME AND NUMBER OF DAYS
76 |
77 | ```
78 |
79 | #include
80 | using namespace std;
81 | int main()
82 | {
83 | int no;
84 | cout<<"Enter any number\n";
85 | cin>>no;
86 | switch(no)
87 | {
88 | case 1:
89 | cout<<"January-31";
90 | break;
91 | case 2:
92 | cout<<"February-28/29";
93 | break;
94 | case 3:
95 | cout<<"March-31";
96 | break;
97 | case 4:
98 | cout<<"April-30";
99 | break;
100 | case 5:
101 | cout<<"May-31";
102 | break;
103 | case 6:
104 | cout<<"June-30";
105 | break;
106 | case 7:
107 | cout<<"July-31";
108 | break;
109 | case 8:
110 | cout<<"August-31";
111 | break;
112 | case 9:
113 | cout<<"September-30";
114 | break;
115 | case 10:
116 | cout<<"October-31";
117 | break;
118 | case 11:
119 | cout<<"November-30";
120 | break;
121 | case 12:
122 | cout<<"December-31";
123 | break;
124 | default:
125 | cout<<"Invalid Input";
126 | }
127 | }
128 |
129 |
130 | /*
131 | ### Output ###
132 | Enter any number
133 | 3
134 | March-31
135 | */
136 |
137 | ```
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 | CHECK ALPHABELT IS CONSONENT OR VOWEL METHOD 1
149 |
150 | ```
151 |
152 | #include
153 | using namespace std;
154 | int main()
155 | {
156 | char ch;
157 | cout<<"Enter any alphabelt\n";
158 | cin>>ch;
159 | switch(ch)
160 | {
161 | case 'a':
162 | cout<<"vowel";
163 | break;
164 | case 'e':
165 | cout<<"vowel";
166 | break;
167 | case 'i':
168 | cout<<"vowel";
169 | break;
170 | case 'o':
171 | cout<<"vowel";
172 | break;
173 | case 'u':
174 | cout<<"vowel";
175 | break;
176 | default:
177 | cout<<"Consonent";
178 | }
179 | }
180 |
181 |
182 | /*
183 | ### Output ###
184 | Enter any number
185 | m
186 | Consonent
187 | */
188 |
189 | ```
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 | CHECK ALPHABELT IS CONSONENT OR VOWEL METHOD 2
201 |
202 | ```
203 |
204 | #include
205 | using namespace std;
206 | int main()
207 | {
208 | char ch;
209 | cout<<"Enter any alphabelt\n";
210 | cin>>ch;
211 | switch(ch)
212 | {
213 | case 'a':
214 | case 'e':
215 | case 'i':
216 | case 'o':
217 | case 'u':
218 | cout<<"vowel";
219 | break;
220 | default:
221 | cout<<"Consonent";
222 | }
223 | }
224 |
225 |
226 | /*
227 | ### Output ###
228 | Enter any number
229 | o
230 | vowel
231 | */
232 |
233 | ```
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 | SIMPLE CALCULATOR PROGRAM
246 |
247 | ```
248 |
249 | #include
250 | using namespace std;
251 | int main()
252 | {
253 | float x,y;
254 | cout<<"Enter first number\n";
255 | cin>>x;
256 | cout<<"Enter second number\n";
257 | cin>>y;
258 | cout<<"Enter\n+ for add\n- for sub\n* for multiply\n/ for div\n";
259 | cin>>ch;
260 | switch(ch)
261 | {
262 | case '+':
263 | cout<<"Add="<<(x+y);
264 | break;
265 | case '-':
266 | cout<<"Sub="<<(x-y);
267 | break;
268 | case '*':
269 | cout<<"Multiply="<<(x*y);
270 | break;
271 | case '/':
272 | cout<<"Div="<<(x/y);
273 | break;
274 | default:
275 | cout<<"Invalid Input!!!";
276 | }
277 | }
278 |
279 |
280 | /*
281 | ### Output ###
282 | Enter first number
283 | 45
284 | Enter second number
285 | 5
286 | Enter
287 | + for add
288 | - for sub
289 | * for multiply
290 | / for div
291 |
292 | +
293 | Add=50.0
294 |
295 | */
296 |
297 |
298 | ```
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 | SIMPLE ATM PROGRAM
310 |
311 | ```
312 |
313 | #include
314 | using namespace std;
315 | int main()
316 | {
317 | float amt,creditamt,debitamt;
318 | char ch;
319 | cout<<"Enter initial amount\n";
320 | cin>>amt;
321 | cout<<"Enter\nc for credit\nd for debit\nb for balance\n";
322 | cin>>ch;
323 | switch(ch)
324 | {
325 | case 'c':
326 | cout<<"Enter credit amount\n";
327 | cin>>creditamt;
328 | amt=amt+creditamt;
329 | cout<<"New Amount="<>debitamt;
334 | if(amt>=debitamt)
335 | {
336 | amt=amt+debitamt;
337 | cout<<"New Amount="<
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 | **Note:**
385 | - Give a STAR if you like this
386 | - FORK to get more update
387 | - Make a PULL REQUEST to countribute
388 |
389 |
390 |
391 |
392 |
393 |
394 |
--------------------------------------------------------------------------------
/Tutorials/C++ Basic Tutorials/Simple Programs/FUNCTION/String Program List.md:
--------------------------------------------------------------------------------
1 | # String Program List in C++
2 |
3 | **Note:**
4 | - Give a STAR if you like this
5 | - FORK to get more update
6 | - Make a PULL REQUEST to countribute
7 |
8 |
590 |
591 |
592 | **Note:**
593 | - Give a STAR if you like this
594 | - FORK to get more update
595 | - Make a PULL REQUEST to countribute
596 |
597 |
598 |
599 |
--------------------------------------------------------------------------------
/Tutorials/C++ Basic Tutorials/Simple Programs/IF, IF ELSE, NESTED IF/If Program List.md:
--------------------------------------------------------------------------------
1 | # C++ If Program List
2 |
3 | **Note:**
4 | - Give a STAR if you like this
5 | - FORK to get more update
6 | - Make a PULL REQUEST to countribute
7 |
8 |