Click here to Skip to main content
15,906,341 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
dear all

i got problem to compiler the source code

source online compiler result

please,help me know the result

thank you

What I have tried:

do my best about i know

i retry rewrite the source code
Posted
Updated 5-Jan-18 19:58pm
v2

1 solution

Start by looking at your error messages: they are in perfectly good English, and are - surprisingly - very clear.
prog.c:3:6: warning: return type of ‘main’ is not ‘int’ [-Wmain]
 void main(void)
Correct: you have written it as void function. Change "void main" to "int main" and return zero at the end of the function.
prog.c:9:3: error: expected ‘;’ before ‘for’
   for (i = 0; i < 4; i++)
So look at your code:
C++
pa = a
  for (i = 0; i < 4; i++)
It's not wrong: where is the semicolon between the two commands?
And so forth...

Read the messages. Think about what they say.
Don't just go "it didn't work" or you will get nowhere - getting it to compile is the easy bit! After that, you have to get it to work, and that's a lot harder.
 
Share this answer
 
Comments
CPallini 6-Jan-18 5:39am    
5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900