MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming

github.com/Rustam-Z/cpp-programming @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
799 symbols 1,300 edges 185 files 145 documented · 18% updated 9mo ago★ 4212 open issues

Browse by type

Functions 545 Types & classes 254
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

C++ Programming

Contents

Keep These Tips in Mind While Learning Programming

1. Learn and code every day, consistency is important.
2. Write it down - plan your code before you start coding and understand the input to your program and the output from your code.
3. Learn to debug your code - look at the code line by line to see how it works.
4. Surround yourself with other people who are learning. Teach each other.
5. Learn taking notes.
6. Build something, anything you would enjoy while coding. Be unique.
7. Focus on 1 thing! Take small steps, but every day, consistency is very important again.
8. Learn to ask GOOD questions to others:
  - G: Give context on what you are trying to do, clearly describing the problem.
  - O: Outline the things you have already tried to fix the issue.
  - O: Offer your best guess as to what the problem might be. It helps the person who is helping you not only know what you're thinking but also know that you've thought of something yourself.
  - D: Demonstrate what's going on. Include the code, the tracing error message, and an explanation of the steps you followed that resulted in the error. That way, the person helping doesn't have to try to recreate the problem.

Computer Science Basics

Learning Resources

Problem Solving

  1. C++ Program to print "Hello, World!".
  2. C++ Program to print an integer entered by the user.
  3. C++ Program to Add/Subtract/Multiply/Divide Two Integers.
  4. C++ Program to Add/Subtract/Multiply/Divide Two Integers entered by the user.
  5. C++ Program to Add/Subtract/Multiply/Divide two Floating Point Numbers.
  6. C++ Program to Compute Quotient and Remainder.
  7. C++ Program to Calculate the Area and Circumference of a Circle.
  8. C++ Program to Calculate the Area of a Scalene Triangle.
  9. C++ Program to Calculate the Area of an Equilateral Triangle.
  10. C++ Program to Calculate the Area of Right Angle Triangle.
  11. C++ Program to Calculate the Area and Perimeter of a Rectangle.
  12. C++ Program to Calculate the Area and Perimeter of a Square.
  13. C++ Program to Find ASCII Value of a Character.
  14. C++ Program to Find the Size of int, float, double, and char.
  15. C++ Program to Swap Two Numbers.

  16. C++ program that converts between Celsius and Fahrenheit temperatures based on user input. You can also add conversions for Kelvin.

  17. C++ Program to Check Whether a Number is Even or Odd.
  18. C++ Program to Check Whether a Number is Positive or Negative.
  19. C++ Program to Check Whether a Character is a Vowel or Consonant.
  20. C++ Program to find the Largest Number Among Three Numbers.
  21. C++ Program to find if the entered year is a leap year or not.
  22. C++ program that allows the user to perform basic arithmetic operations (addition, subtraction, multiplication, division) on two numbers. You can also add error handling for division by zero.
  23. BMI Calculator: Create a program that calculates a person's Body Mass Index (BMI) based on their weight and height input. Provide a classification of whether the person is underweight, normal weight, overweight, or obese. Use cin, cout. Formula: bmi = weight / (height * height)

    bmi < 18.5 Underweight
    bmi < 24.9 Normal Weight
    bmi < 29.9 Overweight
    Otherwise Obese
    24. Nested condition
    - Get the age and membership_status as user input. membership_status can be only Y or y. So, if the age is bigger or equal to 18 and if the user is a member of our shop, we provide a 10% discount, else we charge fully.
    - Write a simple chatbot program using nested conditions.
    25. Write a program to calculate taxes, with the following conditions:
    - If the salary is less than $1500, then there are no taxes
    - If the salary is from 1501 to 3000 $ (1501<= salary < 3000) then the tax should be 10%
    - If the salary is from 3001 to 5000 $ (3001 <= salary < 5000) then the tax should be 20%
    - If the salary is above $5000, then the tax should be 30%

    Hint: Formula for finding tax (salary * percentage) / 100

    You must output: - Tax percentage - Salary after taxes 26. Switch: - Program to use switch statement. Display Monday to Sunday. - Program to display arithmetic operator using switch case. 27. C++ Program to Find all Roots of a Quadratic equation. 28. C++ Program to Check Whether a Character is an Alphabet or not.

  24. C++ Program to Calculate the Sum of Natural Numbers.

  25. Program to calculate the sum of numbers from m to n.
    • Hint: Input two numbers m and n. Find the sum of all numbers from m to n. For example m=3 and n=8 then sum will be 3 + 4 + 5 + 6 + 7 + 8 = 33.
  26. Program to print Fibonacci series up to 100.
    • Hint: Fibonacci Series is 1, 1, 2, 3, 5, 8, 13, 21, ...
  27. C++ program to print Even numbers up to 100.
  28. C++ program to Generate a Multiplication Table.
  29. C++ program to Calculate the Power of a Number.
  30. Factorial Calculator: Write a program that calculates the factorial of a given positive integer. Factorial of a number is the product of all positive integers from 1 to that number.
  31. Prime Number Checker: Create a program that determines whether a given number is prime or not. A prime number is a positive integer greater than 1 that has no positive divisors other than 1 and itself.
  32. C++ Program to Display Prime Numbers Between Two Intervals.
  33. Program to print stars Sequence1.

    ```cpp * **




    ```

  34. Program to print stars Sequence2.

    ```cpp * **




    ```

  35. Program to print star Sequences3.

    ```cpp *



    ```

  36. Program to print Sequence4.

    ```cpp * **







    ** * ``` 41. Sum of Numbers: Write a program that prompts the user for an integer n and then calculates the sum of all integers from 1 to n using a for or while loop. Also, calculate the sum of all even and odd numbers. 42. Guess the Number Game: Create a simple game where the program picks a number (int number = 42;), and the user has to guess the number, receiving hints (higher or lower). Use a while loop to handle the game process. If the user guesses the number, stop the program and display the number of attempts made by the user. 43. User Menu Interaction: Create a text menu that provides the user with several options (e.g., "1. Perform action 1", "2. Perform action 2," and so on). Use a while loop to continue the program until the user chooses the exit option (system("exit");). 44. Program to display the series and find the sum of 1 + 3 + 5 + ... + n. 45. Program to display the sum of the series 1 + 1/2 + 1/3 + ... + 1/n. 46. Write a program to add the first seven terms of the following series using a for loop: 1/1! + 2/2! + 3/3! + ... 47. C++ Program to Find GCD of Two Numbers. 48. C++ Program to Find LCM of Two Numbers. 49. C++ Program to Display Characters from A to Z Using Loop. 50. C++ Program to Count Number of Digits in an Integer. 51. C++ Program to Reverse a Number. 52. C++ Program to Calculate the Power of a Number. 54. C++ Program to Check Whether a Number is Palindrome or Not. 54. C++ Program to Check Armstrong Number. 55. C++ Program to Display Armstrong Number Between Two Intervals. 56. C++ Program to Convert Binary Number to Decimal and vice-versa. 57. C++ Program to Convert Octal Number to Decimal and vice-versa. 58. C++ Program to Convert Binary Numbers to Octal and vice-versa.

  37. C++ Program to Reverse a Sentence using recursion function.

  38. C++ Program to calculate the power using recursion function.
  39. Build a program for calculating the area and perimeter of various geometric shapes (circle, rectangle, triangle, etc.) using separate functions for each shape.
  40. Simple Calculator Program: Create a program that acts as a basic calculator, allowing users to perform addition, subtraction, multiplication, and division. Use functions for each operation.
  41. Write a program to swap two values using functions.
  42. Write a program to convert time to minutes using functions. (input 3 variables namely hours, minutes, and seconds. Convert everything into minutes.)
  43. Write a program to sum the Fibonacci series up to n (input n). 1, 1, 2, 3, 5, 8, 13,
  44. Function Overloading and Default Arguments: Build a program for calculating the area and perimeter of various geometric shapes (circle, rectangle, triangle, etc.) using separate functions for each shape. Overload functions for shapes with different parameters.
  45. Employee Payroll: ****Design a program that calculates employee payroll, including basic salary, overtime pay, and deductions. Use functions to compute each component.
  46. Temperature in °C can be converted to °F using this formula: °F = (°C x 9/5) + 32. Write a function which converts °C to °F, convert_celsius_to-fahrenheit.
  47. Write a function called check-season, it takes a month parameter and returns the season: Autumn, Winter, Spring or Summer.
  48. Write a function called calculate_slope which return the slope of a linear equation.
  49. Student Grade Tracker: Create a program that allows teachers to enter student grades and calculate averages, find the highest and lowest scores, and display statistics.
  50. Library Management System: Create a simple library management system where you can store and manage a list of books using arrays. Ask the user to enter the book names. You should have the function display the book names. Create a void function. You should have the functionality to update the book name. To do this create another function. And pass index as argument.
  51. Write a function to merge two arrays.
  52. Write a function to search the value in the array and return its index, if the value is not found print “Item not found”.
  53. Number Sorting: Write a program that reads a list of numbers into an array and sorts them in ascending or descending order using a sorting algorithm.
  54. Matrix Operations: Write a program for basic matrix operations, such as addition, subtraction, multiplication, and transposition.
  55. In a small company, there are five salesmen. Each salesman is supposed to sell three products. Write a program using a 2D array to print (Input from user). The total sales by each salesman and Total sales of each item.
  56. C++ Program to Calculate Standard Deviation.

  57. C++ Program to Access Elements of an Array Using Pointer.

  58. Write a program that declares an integer variable, assigns a value to it, and then uses a pointer to print the value.
  59. Swap the values of two integer variables using pointers.
  60. Write a program that finds the sum of elements in an integer array using a pointer.
  61. Create a dynamic integer array and prompt the user for the array size. Fill the array with user input values.

  62. C++ Program to Find Largest Number Using Dynamic Memory Allocation.

  63. C++ Program to Find the Frequency of Characters in a String.
  64. C++ Program to count the number of vowels, consonants, and so on.
  65. C++ Program to Remove all Characters in a String Except Alphabet.
  66. C++ Program to Find the Length of a String.
  67. C++ Program to Concatenate Two Strings.
  68. C++ Program to Copy String Without Using strcpy().
  69. C++ Program to Sort Elements in Lexicographical Order (Dictionary Order).
  70. C++ Program to Store Information(name, roll, and marks) of a Student Using Structure.
  71. C++ Program to Add Two Distances (in inch-feet) System Using Structures.
  72. C++ Program to Add Two Complex Numbers by Passing Structure to a Function.
  73. C++ Program to Calculate Difference Between Two Time Periods.
  74. C++ Program to Store Information of Students Using Structure.
  75. C++ Program to Store Information Using Structures with Dynamically Memory Allocation.
  76. C++ Program to Write a Sentence to a File.
  77. C++ Program to Read a Line From a File and Display it.
  78. C++ Program to Display its own Source Code as Output.

  79. [OOP] Define a class called Car with attributes like model, and year. Create an object of the Car class and set its attributes. Then, print out the car's details.

  80. [OOP] Redo the same p

Core symbols most depended-on inside this repo

Shape

Method 322
Class 235
Function 223
Enum 19

Languages

C++100%

Modules by API surface

Lab_16/Source.cpp45 symbols
Lab_17/Education.cpp32 symbols
Lab_21/e-commerce.cpp26 symbols
Lab_15/Source.cpp25 symbols
Project_E-Commerce_App_V3.0/Products.h23 symbols
Project_E-Commerce_App_V1.0/Water.h23 symbols
Project_E-Commerce_App_V1.0/Vegetables.h23 symbols
Project_E-Commerce_App_V1.0/BreadBakery.h23 symbols
Lab_11/Source.cpp23 symbols
Project_E-Commerce_App_V2.0/Products.h20 symbols
Lab_21/city_temperature_control.cpp20 symbols
Lab_13/main1.cpp20 symbols

For agents

$ claude mcp add cpp-programming \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page