0

Some one help me with this code..??

I have to find all the possible sides of a rectangle from the given area ...but the problem is i have to get the sides till first decimal number...HELP!! https://code.sololearn.com/coSQ0cmmS6HJ/?ref=app

24th Aug 2018, 4:04 PM
Varun Gupta
Varun Gupta - avatar
5 Answers
+ 3
Use cout<<fixed<<setprecision(1); before printing the variable, to set the number of digits after the decimal point. Also, you need to include the header <iomanip>
24th Aug 2018, 4:32 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 2
Did you write : <iomanip> or #include<iomanip> You need to add the latter. The iomanip library is used to format/manipulate the input/output as per custom preferences.
24th Aug 2018, 5:01 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 1
Can you post the final code?
24th Aug 2018, 5:36 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
0
Kinshuk Vasisht what does <iomanip> will do...nah...its not working bro
24th Aug 2018, 4:41 PM
Varun Gupta
Varun Gupta - avatar
0
Kinshuk Vasisht #include<iomanip>
24th Aug 2018, 5:13 PM
Varun Gupta
Varun Gupta - avatar