Write a program that reverses the number entered by the user. Formulate
an equation to come up with the answer. (Hint: You are going to use the modulus
operator.)
Sample Output:
Enter a number: 1234
Number in reverse: 4321
Create a program using the while statement that displays the numbers 0
through 117, in increments of 9.
The FizzBuzz Game
by CodeChum Admin
Let's play a game of FizzBuzz! It works just like the popular childhood game "PopCorn", but with rules of math applied since math is fun, right?
Just print out "Fizz" when the given number is divisible by 3, "Buzz" when it's divisible by 5, and "FizzBuzz" when it's divisible by both 3 and 5!
Let the game begin!
We want to calculate the total marks of each student of a class in Physics,Chemistry and
Mathematics and the average marks of the class. The number of students in the class are entered
by the user. Create a class named Marks with data members for roll number, name and marks.
Create three other classes inheriting the Marks class, namely Physics, Chemistry and
Mathematics, which are used to define marks in individual subject of each student. Roll number
of each student will be generated automatically.
Make a Fraction class having member data as the fraction’s numerator and denominator where both are type int. Member functions should accept input from the user in the form 3/5, and output the fraction’s value in the same format. Another member function should add two fraction values. Write a main () function that allows the user to repeatedly input two fractions and then displays their sum. After each operation, ask whether the user wants to continue.
C++ program that prompts a user to specify a text through the keyboard repeatedly and only terminates when a user enters the text "goodbye" else the program should continue prompting a user to enter a text
Write a program that calculates the sum of the squares of the sides of a triangleDefine two function in a class name matching. In the first function pass a single char array and match the repeated characters. The second function have two char array parameter and match that both are same strings or not.
Write a C++ program that asks the user to enter the number of miles driven and gallons used for each full tank. The program should calculate and display the miles per gallon obtained for each full tank.
Using the flow chart write and a program in C++ Language to compute gross and net pay. Use the following variables. StateTaxRate = 0.0825, countyTaxRate = 0.175