Browse by type
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.
C++ Program to Swap Two Numbers.
C++ program that converts between Celsius and Fahrenheit temperatures based on user input. You can also add conversions for Kelvin.
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.
C++ Program to Calculate the Sum of Natural Numbers.
Program to print stars Sequence1.
```cpp * **
```
Program to print stars Sequence2.
```cpp * **
```
Program to print star Sequences3.
```cpp *
```
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.
C++ Program to Reverse a Sentence using recursion function.
void function. You should have the functionality to update the book name. To do this create another function. And pass index as argument. C++ Program to Calculate Standard Deviation.
C++ Program to Access Elements of an Array Using Pointer.
Create a dynamic integer array and prompt the user for the array size. Fill the array with user input values.
C++ Program to Find Largest Number Using Dynamic Memory Allocation.
strcpy().C++ Program to Display its own Source Code as Output.
[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.
$ claude mcp add cpp-programming \
-- python -m otcore.mcp_server <graph>