C++ using OBJECT ORIENTED PROGRAMMING - Topics
C++ Using OBJECT ORIENTED PROGRAMMING - Practice Problems
C++ Using OBJECT ORIENTED PROGRAMMING - Practice Problems
1. Write a C++ program to print ‘Hello World!’ on screen
2. Write a C++ program to print the sum of two numbers
3. Write a C++ program that takes two numbers and display the product of two numbers
4. Write a C++ program to print the sum, multiply, subtract, divide and remainder of two numbers
5. Write a C++ program that takes five numbers as input to calculate and print the average of the numbers
6. Write a C++ program to swap two variables
7. Write a C++ program to convert a decimal number to binary numbers
8. Write a C++ program to convert a binary number to decimal number
9. Write a C++ program to check whether C++ is installed on your computer or not
10. Write a C++ program and compute the sum of the digits of an integer
11. Write a C++ program to compare two numbers
12. Write a C++ program to count the letters, spaces, numbers and other characters of an input string
13. Write a C++ program to print the ascii value of a given character
14. Write a C++ program that accepts an integer (n) and computes the value of n+nn+nnn
15. Write a C++ program to display the system time
16. Write a C++ program to print the odd numbers from 1 to 20
17. Write a C++ program to print the even numbers from 1 to 20
18. Write a C++ program to convert a string to an integer
19. Write a C++ program to convert seconds to hour, minute and seconds
20. Write a C++ program to compute the sum of the first 100 prime numbers
21. Write a C++ program to compute the square root of an given integer
22. Write a C++ program to check if a positive number is a palindrome or not
23. Write a C++ program to add two numbers without using any arithmetic operators
24. Write a C++ program to add all the digits of a given positive integer
25. C++ program to find area of circle
26. C++ Program to find area of rectangle
27. C++ Program to find area of triangle
28. C++ Program to find area of equilateral triangle
29. C++ Program to find area of rhombus
30. C++ Program to find area of parallelogram
31. C++ Program to find area of Prism
32. C++ Program to find volume of sphere
33. C++ Program to find volume of cylinder
34. C++ Program to find volume of cuboid
35. C++ Program to find volume of cone
36. C++ program to find surface area of cuboid
37. C++ program to find surface area of cylinder
38. C++ program to find surface area of cube
39. C++ program to calculate average marks
40. C++ program to check vowel or consonant
41. C++ program to sum of N numbers
42. C++ program to find factorial of any number
43. C++ Program to calculate electricity bill
44. C++ Program To Calculate CGPA Percentage
45. C++ Program to calculate compound interest
46. C++ Program To Calculate Batting Average
47. C++ Program to Calculate Commission Percentage
48. C++ Program To Find Distance Between Two Points
49. C++ Program To Calculate Power Of Number
50. Write a C++ program to take three numbers from the user and print the greatest number
51. Write a C++ program to find the number of days in a month
52. Write a C++ program to test a number is positive or negative
53. Write a C++ Program to accept number of week’s day (1-7) and print name of the day
54. Write a C++ program that takes a year from user and print whether that year is a leap year or not
55. Write a C++ program to input 5 numbers from keyboard and find their sum and average
56. Write a program in C++ to display the first 5 natural numbers
57. Write a C++ program to check vowel or consonant
58. Write a C++ program to display the cube of the number upto given an integer
59. Write a C++ program to display the n terms of odd natural number and their sum
60. Write a C++ program to display the multiplication table of a given integer
61. Write a C++ program that reads an integer and check whether it is negative, zero, or positive
62. Write a C++ program that reads an positive integer and count the number of digits
63. Write a C++ program that accepts three numbers and check All numbers are equal or not
64. Write a C++ program that accepts three numbers from the user and check if numbers are in "increasing” or “decreasing” order.
65. Write a C++ program that determines a student’s grade (81-100 : A, 61-80 : B, 41-60 : C, 0-40 : D)
66. Write a C++ program to create a simple calculator (1. ADDITION, 2. SUBTRACTION, 3. MULTIPLICATION, 4. DIVISION, 5. EXPONENTIAL, 6. PERCENTAGE, 7. EXIT)
67. Write a C++ program to concatenate two string
68. Write a C++ program to convert all characters in a string to lowercase
69. Write a C++ program to convert all characters in a string to uppercase
70. Write a C++ program to trim a string (remove whitespaces)
71. Write a C++ program to get a substring of a given string between two specified positions
72. Write a C++ program to replace all the ‘d’ characters with ‘f’ characters
73. Write a C++ program to get the length of a given string
74. Write a C++ program to print current date and time in the specified format
75. Write a C++ program to get the character at the given index within the String
76. Write a C++ program to remove a particular character from a string
77. Write a C++ program to reverse a String
78. Write a C++ program to remove html tags from a string
79. Write a C++ program to count total number of lines from a string
80. Write a C++ Program to Accept the Marks of a Student and find Total Marks and Percentage
81. Write a C++ program to print numbers from 1 to 10 using loop
82. Write a C++ program to calculate the sum of first 10 natural number using loop
83. Write a C++ program to print multiplication table of given number
84. Write a C++ program to find the factorial value of any number entered through the keyboard
85. Write a C++ program that prompts the user to input an integer and then outputs the number with the digits reversed order
86. Write a C++ program that reads a set of integers, and then prints the sum of the even and odd integers using loop
87. Write a C++ program to check whether the number is a prime number or not
88. Write a C++ program to calculate HCF of Two given numbers using loop
89. Write a C++ program to enter the numbers till the user wants and at the end it should display the count of positive, negative and zeros
90. Write a C++ program to enter the numbers till the user wants and at the end the program should display the largest and smallest numbers entered
91. Write a C++ program to print out all Armstrong numbers between 1 to 600 using loop
92. Write a C++ program to count total number of notes in entered amount using loop
93. Write a C++ program to print Fibonacci series of n terms where n is input by user using loop
94. Write a C++ program to calculate the sum of following series where n is input by user
95. Write a C++ method to compute the average of three numbers
96. Write a C++ method to find the smallest number among three numbers
97. Write a C++ method to check whether an year entered by the user is a leap year or not
98. Write a C++ program to accept a float value of number and return a rounded float value
99. Write a C++ method to compute the sum of the digits in an integer
100. Write a C++ method to calculate the area of a triangle
101. Write a C++ method to find the area of a pentagon
102. Write a C++ method to find number is even number or not
103. Write a C++ method to check numbers is palindrome number or not
104. Write a C++ method to displays prime numbers between 1 to 20
105. Write a C++ method to find GCD and LCM of Two Numbers
106. Write a C++ method to find factorial using recursion
107. Write a C++ program to reverse an integer number
108. Write a C++ program to round a float number to specified decimals
109. Write a C++ program to test if a double number is an integer
110. Write a C++ program to round up the result of integer division
111. Write a C++ program to convert Roman number to an integer number
112. Write a C++ program to convert a float value to absolute value
113. Create a class entering the command line arguments from the user and show all the arguments as output.
Expand Your Horizons with Our Free YouTube Courses
Our comprehensive YouTube courses cover a wide range of computer science and IT subjects. Each course is carefully crafted to provide you with a solid foundation and a deeper understanding of the topic. Explore our playlist of free courses and learn at your own pace. Stay ahead of the curve and boost your knowledge with our engaging video lectures.