0

What is the error on this code?

int main(void){ int num; printf("enter a number"); scanf("%d",&num); if(num<0); { printf("number is negative"); } else{ printf("number is positive"); } return 0; } https://code.sololearn.com/cHF6sB3C2fu1/?ref=app

4th Jul 2022, 3:56 PM
Nadhil An
Nadhil An - avatar
2 Respuestas
0
Nadhil An Semicolon is there after if statement which should not be Also dont share others code.
4th Jul 2022, 4:03 PM
A͢J
A͢J - avatar
0
Thanku bro
4th Jul 2022, 4:04 PM
Nadhil An
Nadhil An - avatar