0
Help!
Yeah, so I have to write a code in which i have to divide (A/B), result needs to have 10 decimals, and first number mustn't be included. For example 7.4/3 is 2.46667 And my result must be like that: 0.4666666667 Any tips and tricks? Ty.
4 Réponses
+ 3
Where is your code/attempt ??
+ 2
use std::setprecision stream manipulator defined in <iomanip> header.
https://en.cppreference.com/w/cpp/io/manip/setprecision
+ 1
i guess there is needed formatting, something like %0.10f
here is example but its rather pure C than C++
https://code.sololearn.com/cGk1fDeAd7Qo/#cpp
0
That is prefect! Ty for your time!