For each problem write a C++ program that asks the user for input, then calculates and displays the correct output. 1) Bug Collector A bug collector collects bugs every day for seven days. Write a program that keeps a running total of the number of bugs collected during the seven days. The loop should ask for the number of bugs collected for each day, and when the loop is finished, the program should display the total number of bugs collected. 2) Calories Burned Running on a particular treadmill you burn 3.9 calories per minute. Write a program that uses a loop to display the number of calories burned after 10, 15, 20, 25, and 30 minutes. 3) Budget Analysis Write a program that asks the user to enter the amount that he or she has budgeted for a month. A loop should then prompt the user to enter each of his or her expenses for the month, and keep a running total. When the loop finishes, the program should display the amount that the user is over or under budget.
For each problem write a C++
1) Bug Collector
A bug collector collects bugs every day for seven days.
Write a program that keeps a running total of the number of bugs collected during the seven days.
The loop should ask for the number of bugs collected for each day, and when the loop is finished,
the program should display the total number of bugs collected.
2) Calories Burned
Running on a particular treadmill you burn 3.9 calories per minute.
Write a program that uses a loop to display the number of calories burned after 10, 15, 20, 25, and 30 minutes.
3) Budget Analysis
Write a program that asks the user to enter the amount that he or she has budgeted for a month.
A loop should then prompt the user to enter each of his or her expenses for the month, and keep a running total.
When the loop finishes, the program should display the amount that the user is over or under budget.
4) Sum of Numbers
Write a program with a loop that asks the user to enter a series of positive numbers.
The user should enter a negative number to signal the end of the series
After all the positive numbers have been entered, the program should display their sum.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images