Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

programming help needed

Name: Anonymous 2009-01-04 17:26

so here is the project

"write a program that asks the user for a series of integers one at a time. When the user enters the integer 0, the program displays the following info.:
-the number of integers in the series ( not including 0)
- average of the integers
-largest integer in the series
-smallest in the series
- difference between the largest and smallest."

heres what I got so far

"
#include<iostream.h>

main()
{
int number, average, largest, smallest, difference = 0;
int i;
do
{
cout << " enter a number";
cin >> i;
if (i == 0)
{
cout << "The number of integers in the series" << number << endl;
cout << "The average of the integers" << average << endl;
cout << "The largest integer in the series" << largest << endl;
cout << "The smallest integer in the series" << smallest << endl;
cout << "The difference between the largest and smallest integer in the series" << differece << endl;
{break;}
}
}
while (1);
system("pause");
return 0;
"

Name: Anonymous 2009-01-04 23:18

what is this, bring your homework to 4chan day?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List