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



Ask a Question

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. sir i am mca student. i can choose my flatform is
View Tutorial          By: sridevi at 2012-06-06 10:21:39

2. i see that lots of people get this exception : jav
View Tutorial          By: oded at 2008-09-28 03:33:33

3. Thank you! Solved many headaches :)
View Tutorial          By: Dominik at 2013-07-30 16:51:46

4. please give me more information
View Tutorial          By: nandhini at 2012-09-22 03:49:11

5. How can i read PDF files from external memory(SD c
View Tutorial          By: Aswanth at 2014-03-31 09:46:26

6. Hi
Gr8 work......!!!!
thanks...!!!

View Tutorial          By: Antim Jain at 2010-07-12 23:44:14

7. it is possible to write any synchronisation progra
View Tutorial          By: shashi kant mishra at 2013-10-14 02:54:25

8. Really help ful. To read abt jsp and servlet chk o
View Tutorial          By: Raju at 2009-07-13 11:25:41

9. Respected Sir:
i am murugan any java real

View Tutorial          By: murugan at 2012-04-12 05:15:16

10. I am new to J2ME but this was really help full and
View Tutorial          By: Subhash at 2013-05-05 08:57:38