+ 1

How do we give decimal inputs and outputs in C++

16th Oct 2020, 11:23 AM
Bharadwaaja Kanakadandi
Bharadwaaja Kanakadandi - avatar
3 RĂ©ponses
+ 1
by working with floats or typecasting float and using the print specifier %f printf("%f",float_num)
16th Oct 2020, 11:27 AM
Slick
Slick - avatar
+ 1
16th Oct 2020, 11:47 AM
äœ çŸ„é“èŠć‰‡ïŒŒæˆ‘äčŸæ˜Ż
äœ çŸ„é“èŠć‰‡ïŒŒæˆ‘äčŸæ˜Ż - avatar
0
You can use float or double data type double deci=5.678 std::cout<<deci;
16th Oct 2020, 3:25 PM
A S Raghuvanshi
A S Raghuvanshi - avatar