Question: Kindly program only in c++ #1 Write a checkout.cpp program that does the following: Ask the user to enter the price of their items. The

Kindly program only in c++

#1

Write a checkout.cpp program that does the following:

Ask the user to enter the price of their items. The user can enter as many items as they want until the user enters the integer 0.

Print out the total of their checkout.

If the sum is greater than $100, print out "Thats Expensive!"

#2

Write a reverse.cpp program that does the following:

It asks the user to enter an integer between 100 and 9999.

If the entered number is out of range, the program forces the user to enter more numbers until one in the correct range is given.

Then the program prints the digits in the number (in reverse) on separate lines.

Here is an example of how the program should work: Enter an integer between 100 and 9999: 8976 6 7 9 8

#3

Write a triangle.cpp program that does the following:

It asks the user to enter a positive integer.

The program reads a value x entered by the user. If the value is not legal, the program repeatedly makes the user type in another value until a legal value of x has been entered.

The program prints a triangular display which has the number x on its top row. Each later row is obtained by omitting the last digit from the number on the previous row.

For example, if the user enters 19683 for x the program should print the following picture. 19683 1968 196 19 1

#4

Write a reverseSum.cpp program that does the following:

It asks the user to enter a positive integer.

If the input is illegal, the program should terminate.

The program prints the digits of the number in reverse order (separated by spaces) and then gives their sum.

For example, if the user enters 19683 the program should print the following output. 3 8 6 9 1 sum to 27

#5

Write a oddCount.cpp program that does the following:

Ask the user to enter an integer between 1000 and 1000000

If the user enters an invaild input ask the user to try again. The user only has 3 tries. If they fail all 3 times, terminate the program

The Program prints out the number of odd numbers in that integer

For example, if the user enters 167256. The program prints: 3 odd numbers

#6

Write a big.cpp program that does the following:

Ask the user to enter a positive integer with at least 2 digits.

If the user enters an invalid input, ask to try again.

Print out the biggest integer in the user's number

For example, if the user enters 167256. The program prints: 7

#7

Write a factor.cpp program that does the following:

Ask the user to enter a 2-digit number, and store it as an int.

If the input is not a 2-digit number, repeatedly ask the same question until the user enters a 2-digit number.

Print all positive factors of the number, in ascending order, one per line. A number i is a factor of n if when you divide n by i, the remainder is 0.

Then print the total number of factors.

Example: Enter a 2-digit number: 15 Factors: 1 3 5 15 15 has 4 factors.

#8

Write a star.cpp program that does the following:

Ask the user to enter a number divisible by 10

If the user enters an invalid input, terminate the program

Divide the input by 10 and store the answer in a variable x

Print out x number of rows of 10 "*"

For example, if the user enters 50. The program prints: ********** ********** ********** ********** **********

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!