ReadNumbers

Download Category:

ReadNumbers.zip - (408.89 KB)
[
ReadNumbers/Debug/
ReadNumbers/Debug/cl.command.1.tlog
ReadNumbers/Debug/CL.read.1.tlog
ReadNumbers/Debug/CL.write.1.tlog
ReadNumbers/Debug/link.4776.read.1.tlog
ReadNumbers/Debug/link.4776.write.1.tlog
ReadNumbers/Debug/link.4776-cvtres.read.1.tlog
ReadNumbers/Debug/link.4776-cvtres.write.1.tlog
ReadNumbers/Debug/link.command.1.tlog
ReadNumbers/Debug/link.read.1.tlog
ReadNumbers/Debug/link.write.1.tlog
ReadNumbers/Debug/link-cvtres.read.1.tlog
ReadNumbers/Debug/link-cvtres.write.1.tlog
ReadNumbers/Debug/mt.command.1.tlog
ReadNumbers/Debug/mt.read.1.tlog
ReadNumbers/Debug/mt.write.1.tlog
ReadNumbers/Debug/rc.command.1.tlog
ReadNumbers/Debug/rc.read.1.tlog
ReadNumbers/Debug/rc.write.1.tlog
ReadNumbers/Debug/ReadNumbers.exe
ReadNumbers/Debug/ReadNumbers.exe.embed.manifest
ReadNumbers/Debug/ReadNumbers.exe.embed.manifest.res
ReadNumbers/Debug/ReadNumbers.exe.intermediate.manifest
ReadNumbers/Debug/ReadNumbers.ilk
ReadNumbers/Debug/ReadNumbers.lastbuildstate
ReadNumbers/Debug/ReadNumbers.log
ReadNumbers/Debug/ReadNumbers.obj
ReadNumbers/Debug/ReadNumbers.pdb
ReadNumbers/Debug/ReadNumbers.write.1.tlog
ReadNumbers/Debug/ReadNumbers_manifest.rc
ReadNumbers/Debug/vc100.idb
ReadNumbers/Debug/vc100.pdb
ReadNumbers/Question.txt
ReadNumbers/ReadNumbers.cpp
ReadNumbers/ReadNumbers.sln
ReadNumbers/ReadNumbers.suo
ReadNumbers/ReadNumbers.vcxproj
ReadNumbers/ReadNumbers.vcxproj.filters
ReadNumbers/ReadNumbers.vcxproj.user
ReadNumbers/Screenshot_1.jpg
]

1. Write a program that reads numbers from cin and then sums them, stopping when 0 has been entered.
Construct three versions of this program, using the while loop.

Note. Only use the while loop, not the do-while or for loops.

Add the following to your program:
•A counter within the while loop that keeps track of the number of inputs entered
•A comment that determines if the total value is less than 100 or greater than 100, as in the sample output
•Switch statements to determine the total number of inputs

Refer to the following sample output.

Enter numbers, one per line. Enter 0 to end:

7

8

6

5

5

9

8

0

Thank you. The total was 48.

The total number of inputs read: 8

The total is less than 100.

Write a Review

Get a fresh solution of this question. Ask it now to our experts.
doubt

Ask Your Question

We have verified professionals who are ready to answer your question.

time

Save Time and Money

We choose experts who can quickly answer your question and that suit your budget.

download

Get Your Answer

Your satisfaction is 100% guaranteed. You can keep on asking questions until you get the answer you need.