+ 1
How do we give decimal inputs and outputs in C++
3 RĂ©ponses
+ 1
by working with floats or typecasting float and using the print specifier %f printf("%f",float_num)
+ 1
float f;
cin >> f;
cout << f;
https://www.sololearn.com/learn/CPlusPlus/1607/
0
You can use float or double data type
double deci=5.678
std::cout<<deci;