First off let me start by saying I am not asking anyone to do my homework for me. I go to every class, take notes, and try to keep up but this computer programming class just does not click with me. I am a math major and for some reason they make us take this class. With that being said...this is my last program of the semester and I am lost..Any help would be greatly appreciated. Here is what we are supposed to come up with and here is what I have now.
#include <iostream>
usingnamespace std;
#define n 10
int arr [n] // missing semi-colon
int main ()
{
int n;
int i;
avg = sum/n; // avg and sum variables not declared
// you must declare the variables before using them.
n = 0-9;
cout << "Enter 10 digits: " // missing semi-colon
// seems to be missing the user input as well.
for (i = 0; i < n; i++)
{
for (i = 0; i < n; i++)
if i < n cout << "<" <<; // condition must be inside parenthesis like if ( i < n )
// can't put nothing on the right hand side of <<
elseif i == n cout <<"=" <<; // condition must be inside parenthesis
// can't put nothing on the right side of <<
else cout << ">" <<; // can't put nothing on the right hand side of <<
}
cout << "PROGRAM ENDS" <<; // cannot put nothing on the right hand side of <<
// no return value, you must return 0 or an integer
// because you specified your main function to return an int.
}