Comment on Tutorial - Using switch Statements in C++ By Emiley J



Comment Added by : basil

Comment Added at : 2011-08-04 13:00:30

Comment on Tutorial : Using switch Statements in C++ By Emiley J
3. Write a program that will continuously ask for an integer input from the user until a negative
value is entered. Display the sum and the average of the numbers entered (not including the
negative sentinel value). (Filename: Filename: Exer6.cpp)
Example output:
Please enter number 1? 10
Please enter number 2? 8
Please enter number 3? 3
Please enter number 3? -1
Average is 7.
Computer for sum and average again [Y/N]? N
Goodbye.


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. today Iam getting time ,date of sending and "
View Tutorial          By: raghu at 2012-01-07 14:43:32

2. hey. How would i get the ClientLists displayed in
View Tutorial          By: andrew at 2009-07-24 14:10:24

3. its nice example for beginers
View Tutorial          By: Ramesh at 2012-02-15 18:13:09

4. Thanks a ton! :)
View Tutorial          By: Prateek at 2015-03-12 11:40:08

5. Excellent explanation. How can I take input from t
View Tutorial          By: Joe at 2013-03-31 11:02:28

6. Can anybody tell the steps to go ahead with the ex
View Tutorial          By: shikha at 2009-11-03 10:42:34

7. Hey there, I was needing something exactly like th
View Tutorial          By: Jeffry at 2013-03-26 03:33:27

8. i9s this such a hard ?

my head was

View Tutorial          By: shadow_5566 at 2009-05-14 01:32:01

9. Great tutorial
View Tutorial          By: Stephen at 2014-07-21 12:08:32

10. how to connect the database in servelet use to sta
View Tutorial          By: sudhir singh tomar at 2011-04-28 03:10:34