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



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. Hello,
I've tried the above code, but I've

View Tutorial          By: Phyo Phyo at 2009-09-14 05:32:28

2. Thankyou it is Working Fine .....
View Tutorial          By: PDCOE at 2009-02-11 23:02:29

3. Good explanation but I think there's a slight mist
View Tutorial          By: Cheeseman at 2009-05-19 10:12:11

4. well,its better to teach with video how it works
View Tutorial          By: c.muthukumar at 2010-09-22 07:28:24

5. Thank you, this tutorial is well-written and made
View Tutorial          By: Adrien Tétar at 2012-10-28 19:01:57

6. i am getting a force close...can anyone please hel
View Tutorial          By: jack at 2012-03-22 15:18:37

7. You have clear my confusion by using simple codes!
View Tutorial          By: salahu.kt at 2010-09-28 07:33:55

8. Hi I have Fixed - "NoSuchPortException"
View Tutorial          By: vijay at 2011-02-19 01:44:37

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

10. sir, am doing my mca project in java based on netw
View Tutorial          By: saravanapriya at 2011-11-24 03:25:06