+ 1

Please see my code and give answer

https://code.sololearn.com/cv6szpYvik0Z/?ref=app

25th Apr 2021, 12:18 AM
Melu
Melu - avatar
2 Respostas
+ 4
Change your types to float if you want the result to be a float. int doesn't have any fractional part. You can then use a little formatting so that it will only output 1 place after the decimal point. float a = 15; float b = 2; int main() { float c = a / b; printf("%.1f",c); return 0; }
25th Apr 2021, 12:24 AM
ChaoticDawg
ChaoticDawg - avatar
+ 2
Ya that was work😍 tnx🙏
25th Apr 2021, 12:28 AM
Melu
Melu - avatar