Hi,
I wrote this code to add 10 numbers and find their average. It will not out put average.
What am I doing wrong?
Thanks for the help.
#include <iostream>
using namespace std ;
int main ( )
{
double Sum;
double Average;
double Numbers[10];
int K;
Sum = 0;
Average = 0;
for ( K = 0; K < 10; K++ )
{
cout << " Enter Your Numbers " << ( K + 1 ) << endl;
cin >> Numbers[K];
Sum = Sum + Numbers[K];
}
Average = Sum/10;
for ( K = 0; K < 10; K++);
{
cout << " The numbers you Entered are " << Numbers [K] << endl;
}
cout << " The Average of the Numbers is " << Average << endl;
return(0);
}