Sahi hai kya ye code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
3rd Dec 2018, 2:03 PM
Suraj yadav
Suraj yadav - avatar
2 Answers
+ 1
Ok
4th Dec 2018, 12:38 PM
Suraj yadav
Suraj yadav - avatar
0
1. Modify the data type of your input variables to int as you read them with %d int a, b, c; 2. Modify reading input ( one input per line I think that is better) from scanf("%d%d",&a,&b); to scanf("%d\n %d\n",&a,&b); Have in mind that the a/b maybe returns float number so check if c variable should be float and cast the result as follow : c = (float) a / b;
3rd Dec 2018, 3:03 PM
Prokopios Poulimenos
Prokopios Poulimenos - avatar