on taking inputs like 1.44 ,it is showing only 1.
similarly on 0.64 ,it shows 0.
why it is showing only integer part of float nos. ???
on taking inputs like 1.44 ,it is showing only 1.
similarly on 0.64 ,it shows 0.
why it is showing only integer part of float nos. ???
hello @gargshivam2001
if u use int or long long datatype for storing float/double then only integer part get stored in them.
hence while printing u will get only integer par
But I have been using float for storing float nos. ,then what is the issue ??
pls share ur code using cb ide i will check
@gargshivam2001
u were not giving input correctly.
u need to input two integers n and p for getting a valid ouput
check now->
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.