Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C # Programming: Write a console app called CollectTurtleSizes that continuously prompts the user to enter sizes of turtles (in inches) until the sentinel value

C # Programming: Write a console app called CollectTurtleSizes that continuously prompts the user to enter sizes of turtles (in inches) until the sentinel value of 0 is entered. You must use a loop to get these turtle sizes from the user. As you get each turtle size, count it and accumulate it. In other words, use a counter variable and add 1 to it each time you get a turtle value. Similarly, use an accumulator variable and add the turtle size to it each time you get one. After the loop is done, output the number of turtle values collected, the sum of turtle values, and the average turtle size (in inches).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions