0

Whats the error here?

#include<stdio.h> int main (); { printf("addition between two digits\n"); int x; puts("input value 1"); scanf("%d",&x); int y; puts("input value 2"); scanf("%d", &y); int sum; sum = x + y; printf("the sum is %d\n" , sum); //here sum is %d because int sum; , which means the sum is a variable here and the value of variable is defined or mentioned as %d }

11th May 2020, 2:26 PM
Dark AR
Dark AR - avatar
2 Respostas
+ 1
Remove that semicolon after main().
11th May 2020, 3:15 PM
Avinesh
Avinesh - avatar
0
int main() function terminates due to semicolon
11th May 2020, 3:41 PM
Vaibhav Narayan Patil
Vaibhav Narayan Patil - avatar