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. Thanks! Very helpful in creating a program i am tr
View Tutorial          By: BHaos at 2014-12-05 16:32:53

2. Thank you for giving info.
View Tutorial          By: Deepak cheela at 2013-01-23 07:03:08

3. Hi Ashley, thank you for this Android Gridview tut
View Tutorial          By: Giancarlo Leonio at 2013-03-12 00:37:15

4. this is the output i get.
Help me.
<

View Tutorial          By: shubham saxena at 2014-04-01 17:06:00

5. @ Qui:

You can set the CSS Style:
View Tutorial          By: hache at 2010-06-22 02:02:56

6. great work
View Tutorial          By: Dinesh557 at 2008-09-25 00:27:59

7. Hi , I am mew to java please can u send detail how
View Tutorial          By: ramanji at 2011-12-11 05:36:41

8. The SAX Parser code has a problem for files of gre
View Tutorial          By: Mark Nelson at 2011-11-14 20:16:41

9. This explaination is good to understand the basic
View Tutorial          By: Nisha Thankachan.F at 2013-02-13 05:29:13

10. very simple explanation
View Tutorial          By: shahbaz at 2010-03-19 10:34:32