Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок+ 1
How to get output in decimals in division
2 ответов
+ 19
Use float data type or double for your variable
float a , b, c;
c= a/b;
+ 3
Or type cast them:
int x=3, y=4;
float quot=float(x)/float(y);
cout << quot;