Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a c + + code Class activity 7 . A Learning outcome: test students' ability to create a counting loop using while loop. Activity

write a c++ code Class activity 7.A
Learning outcome: test students' ability to create a counting loop using while loop.
Activity description: counting from a given number
Use a while or do-while loop to display a range of number.
The initial number is collected from the keyboard and print numbers from the initial number down to 10, in a step of 1.
The initial number must be between 15 and 20, inclusive.
Use while or do-while loop to make sure that the initial is between 15 and 20.
If the initial number is not between 15 and 20, the program will ask the user to enter a valid number.
The program will print when the initial number is between 15 and 20.
Class activity 7.B
Learning outcome: test students' ability to create an application using counting loop with break and/or continue statement.
Activity description: average grade checker
Create a C++ program that will ask the user to enter grades and stop when the average of all grades is greater than or equal to 80. The program should that the following requirements:
grades, which are entered by the user, have to be between 1 and 100, otherwise, the program will ask the user to enter another grade.
the average of the entered grades is calculated as:
average = sum of all grades / number of grades
when the average reaches more than 80, the program will stop and display the total average:
The average for ____ number of grades is _______

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

From whom would you prefer to get this information? Why?

Answered: 1 week ago

Question

Does your strategic intent play to your strengths?

Answered: 1 week ago