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. This is not an easy example for begineer, please t
View Tutorial          By: Arif Islam Nayan at 2009-12-16 08:24:57

2. Friends i m getting error while intrepreting the e
View Tutorial          By: Hanuman at 2014-02-04 14:14:00

3. HI Friends,

I am new to java and i

View Tutorial          By: Srini at 2015-04-05 17:00:58

4. exellent, thks!!!
View Tutorial          By: Eduardo at 2010-01-29 19:20:15

5. Good morning!
I need help about how to conf

View Tutorial          By: alpha at 2009-06-14 03:20:41

6. I have use the above code, Am getting the below er
View Tutorial          By: RameshKumar at 2011-07-25 05:02:12

7. That's a very nice and simple article,
Tha

View Tutorial          By: Mohsen at 2009-10-11 03:07:18

8. providing explanation about the topics is very use
View Tutorial          By: vikram naidu at 2010-06-09 23:40:41

9. Thanks for the tips.

I hesitated to

View Tutorial          By: Dick at 2011-10-09 15:21:50

10. Thanks - very useful!
View Tutorial          By: Adam Musial-Bright at 2010-02-28 06:14:39