prog.c:2:1: error: 'main' must return 'int'
void main()
^~~~
int
prog.c:5:27: error: extraneous ')' after condition, expected a statement
while(scanf("%d",&num)>0))
^
prog.c:12:12: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
if(num1=num)
~~~~^~~~
prog.c:12:12: note: place parentheses around the assignment to silence this warning
if(num1=num)
^
( )
prog.c:12:12: note: use '==' to turn this assignment into an equality comparison
if(num1=num)
^
==
prog.c:33:2: error: expected '}'
}
^
prog.c:3:1: note: to match this '{'
{
^
1 warning and 3 errors generated.