Dec 11, 2013 at 2:57pm UTC
remove semi-colon from end of line 8.
and use indenting and braces to make your for.. else more readable.
Last edited on Dec 11, 2013 at 2:57pm UTC
Dec 11, 2013 at 3:02pm UTC
move the semicolon from the end of line 8 to the end of line 7
Dec 11, 2013 at 3:10pm UTC
Still same error and by mistae I reported mutexe... I am so sorry
#include <iostream>
using namespace std;
{
int sample[8];
int i;
int k;
for (k=0; k < 8; k++)
if (k % 2 ==0)
sample[k] = k;
else
sample[k] = k + 100;
return 0;
}
Dec 11, 2013 at 3:28pm UTC
please listen. indent your code.
your code body needs to be inside a main function...
Last edited on Dec 11, 2013 at 3:56pm UTC
Dec 11, 2013 at 3:31pm UTC
where is the head of function?
Dec 11, 2013 at 3:56pm UTC
wtf have i been reported?
Dec 11, 2013 at 3:57pm UTC
where is the head of function?
what do you mean by that?
it worked anyway...Thank you mutexe
Dec 11, 2013 at 5:00pm UTC
Yes by mistake.. I am so sorry.. I thought it was reply button....
Dec 11, 2013 at 5:04pm UTC
Mutexe,
I am new to this forum and I am new to c++ so forgive me I need a lot of help in c++.