0
How can I use floor division with variable in C language
Thanks for help in advance😁
6 ответов
+ 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.
+ 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);
+ 1
Can u explain me more actually I'm begginer and its difficult for me to understand. I need a example please
+ 1
Thanks for help😊
+ 1
did you study on MIT
0
No