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've tried this but got a problem. Firs

View Tutorial          By: Hendrik Jabs at 2009-12-10 02:46:13

2. hi..dud.......
please help me in my proj

View Tutorial          By: amar usakoyal at 2010-05-25 03:31:16

3. hi
i try to write a code for send data or s

View Tutorial          By: mjh at 2011-02-16 08:26:10

4. how can we split 12+12 into three tokens like 12,+
View Tutorial          By: arjun at 2012-11-26 11:07:24

5. I got the sample and the test working. Thanks a lo
View Tutorial          By: Trishul at 2009-10-26 07:32:57

6. Thanks for a great post. Solved a problem for me i
View Tutorial          By: Mark at 2013-01-08 07:00:47

7. how to import myownclass into another class same p
View Tutorial          By: rana at 2013-04-19 17:32:08

8. im biginner of java programming, please give me in
View Tutorial          By: siva at 2011-11-04 06:40:45

9. i want to open pdf file from sd card and i dont wa
View Tutorial          By: Karan Mavadhiya at 2013-01-30 12:02:30

10. i have run the program..bt there r so many excepti
View Tutorial          By: ayan at 2010-05-26 10:37:51