+ 1

What mistake this programme

#include <stdio.h> int main() { int a,b,sum; printf("Enter two integer number:"); scanf("%d%d",&a,&b); sum==(a+b); printf("%d is the summation",sum); return 0; }

27th Feb 2020, 6:47 PM
Tanjim Ahmed
2 ответов
+ 3
Not is sum== (a+b). You are trying to compare the values, the correct thing is that you should assign the values ​​to the sum variable. The correct is : sum= a +b ;
27th Feb 2020, 6:49 PM
Cmurio
Cmurio - avatar
+ 3
#include <stdio.h> int main() { int a,b,sum; printf("Enter two integer number:"); scanf("%d%d",&a,&b); sum=a+b; printf("%d is the summation",sum); return 0; }
27th Feb 2020, 6:52 PM
Cmurio
Cmurio - avatar