0

How can I use floor division with variable in C language

Thanks for help in advance😁

17th Mar 2021, 3:52 AM
Adarsh Addee
Adarsh Addee - avatar
6 Answers
+ 3
What are you trying to do? As I understand, C division operator works depending on the given operands. When both operands are integers, integer division is performed. When either operand was a floating point number, floating point division is performed.
17th Mar 2021, 4:01 AM
Ipang
+ 2
Copy this snippet and paste into an empty C code in Code Playground int i1 = 5, i2 = 2; float f1 = 5.0, f2 = 2.0; printf("integer division:\n%d/%d = %d\n", i1, i2, i1 / i2); printf("floating point division\n%.1f %.1f = %.1f\n", f1, f2, f1 / f2);
17th Mar 2021, 4:30 AM
Ipang
+ 1
Can u explain me more actually I'm begginer and its difficult for me to understand. I need a example please
17th Mar 2021, 4:21 AM
Adarsh Addee
Adarsh Addee - avatar
+ 1
Thanks for help😊
17th Mar 2021, 4:56 AM
Adarsh Addee
Adarsh Addee - avatar
+ 1
did you study on MIT
22nd Mar 2021, 7:32 AM
STOP
STOP - avatar
0
No
22nd Mar 2021, 12:05 PM
Adarsh Addee
Adarsh Addee - avatar