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. hi.I am new in j2me and really want to learn more
View Tutorial          By: Deepak kumar at 2010-11-15 03:04:15

2. Very nice one, it really helps me. Thank you very
View Tutorial          By: eky1412 at 2012-09-10 03:45:07

3. Good information...it help me to do mi projecto! t
View Tutorial          By: gnk at 2010-08-12 01:01:50

4. this is WRONG!

your IF should be:
View Tutorial          By: notnooblikeyou at 2013-01-29 15:11:30

5. Great!! Many thanks!
View Tutorial          By: Louis at 2013-06-01 23:16:41

6. Hi Friends.... This code is working correctly with
View Tutorial          By: kasi at 2009-11-25 23:52:56

7. hi,
i am safeer, i am try this program in

View Tutorial          By: Safi at 2009-05-22 22:32:04

8. Hi sir !

I have two Crystal Report

View Tutorial          By: Anderson Abad at 2011-07-20 03:34:51

9. This example of function overloading is easy for U
View Tutorial          By: Pranay Gaikwad at 2012-10-30 14:02:15

10. If i delete a record, will that recId be replaced
View Tutorial          By: faisal at 2009-06-08 21:36:29