Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
Write a program that ask for user input from 5 to 9 then calculate the average
Write a program that ask for user input from 5 to 9 then calculate the average
✍: Guest
int main() { int MAX=4; int total =0; int average=0; int numb; cout<<"Please enter your input from 5 to 9"; cin>>numb; if((numb <5)&&(numb>9)) cout<<"please re type your input"; else for(i=0;i<=MAX; i++) { total = total + numb; average= total /MAX; } cout<<"The average number is"<<average<<endl; return 0; }
2012-03-28, 4753👍, 0💬
Popular Posts:
If we inherit a class do the private variables also get inherited ? Yes, the variables are inherited...
Which one of the following statements is TRUE in regard to overloading the ++ operator? 1 You cannot...
How To Enter Microseconds in SQL Statements? - MySQL FAQs - Introduction to SQL Date and Time Handli...
What are urlencode() and urldecode() functions in PHP? string urlencode(str) - Returns the URL encod...
What does AddressOf operator do in background ? The AddressOf operator creates a delegate object to ...