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. # include <iostream.h>
int main ()
View Tutorial          By: nazarine at 2011-07-06 06:17:10

2. Simple and easy code..........
View Tutorial          By: mandalson at 2011-12-24 04:08:12

3. sr
thanks 4 information provided
b

View Tutorial          By: veer kumar at 2012-07-25 18:30:38

4. help me pls example ng c++ program code using do
View Tutorial          By: diana bernardo at 2010-10-15 23:34:19

5. good going java samples
View Tutorial          By: Rajesh at 2010-08-17 03:36:12

6. tnx man that was short and well explained...
View Tutorial          By: jsf noob at 2012-02-02 13:24:12

7. i want a java code to make a GUI in netbeans and s
View Tutorial          By: siddharth at 2012-03-17 09:59:59

8. can anybode tell me how can i make my own bluetoot
View Tutorial          By: Prasenjit at 2013-10-11 06:57:13

9. Simple Example. Understood. Thanx.
In aksha

View Tutorial          By: Amila Nadanda at 2011-07-28 06:21:05

10. Thanks friend this code will really help me

View Tutorial          By: Anonymous at 2009-05-04 20:16:58