I need HELP
YusiruMadurappe

Problem: Roll carpet comes in rolls 3.66 meters wide. Carpet is paid for by the total number
of whole metres that need to be cut from the roll. It may be laid in a rectangular room
lengthways or widthways. Either way there might be some wastage. The length of a room is
always its longer dimension and its width is always its shorter dimension.

Write a program that repeatedly asks the user for room dimensions until either dimension
entered is zero or less. For each room print the length and width (to the nearest millimetre),
and the total length of carpet required in whole metres, both lengthwise and widthwise.

You are viewing a single comment. View All
SixBeeps

Which part is tripping you up?

YusiruMadurappe

https://repl.it/@YusiruMadurappe/BulkyWhoppingLoopfission @SixBeeps

I did up to this but i don't know how to get the total lengthways and widthways.

SixBeeps

@YusiruMadurappe Ah, you're doing a floor division. Although it might be easy to use, this is not the time for it. Instead, you should round it up, not down.

YusiruMadurappe

I didn't understand what you said.
@SixBeeps

SixBeeps

@YusiruMadurappe Well, it's not there anymore. You used the // operator, which does division, then rounds the result down.

YusiruMadurappe

https://repl.it/@YusiruMadurappe/BulkyWhoppingLoopfission

Can know please tell me what should I do next.
@SixBeeps

SixBeeps

@YusiruMadurappe I'm allowed to answer specific questions, not tell you how to do an assignment.