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, 4665👍, 0💬
Popular Posts:
How To List All Values of Submitted Fields? - PHP Script Tips - Processing Web Forms If you want lis...
What is a fish bone diagram ? Dr. Kaoru Ishikawa, invented the fishbone diagram. Therefore, it can b...
.NET INTERVIEW QUESTIONS - What is COM ? Microsoft’s COM is a technology for component software deve...
What Is Posting? Posting is an event that writes Inserts, Updates and Deletes in the forms to the da...
Jack developed a program by using a Map container to hold key/value pairs. He wanted to make a chang...