0

What's mistake of this programme

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

28th Feb 2020, 5:03 PM
Tanjim Ahmed
2 Antworten
+ 3
Division is /, not \ Edit. You might want to cast to float the divison result as you are dividing two integers. Division = (float)a/b
28th Feb 2020, 5:09 PM
Mihai Apostol
Mihai Apostol - avatar
+ 3
Please include a relevant language in your question tags to improve context clarity -> C Language 👍
28th Feb 2020, 5:21 PM
Ipang