|
-
Aug 18th, 2011, 01:00 AM
#1
Thread Starter
New Member
[RESOLVED] Can anyone please write this program?
Can anyone tell me the Visual Studio 2008 code to run a simple program that will do the following:
A friend of mine is a carpet layer. He needs a way to calculate how much carpet he needs to carpet floors in various rooms.
The carpet he has is supplied in rolls that are 5 meters wide and 30 metres long. Any excess width is discarded. This means that rooms that are wider than 5 meters need several strips of carpet. The smallest space that he will carpet is 1m x1m, the biggest is 20m x 20m. At the moment , he has to draw diagrams to work out how much carpet he needs. I told him that I could get a computer program to work this out for him. So I need to make a program that will tell him:
1) How many metres of carpet he will need to cover a room.
2) How many rolls of carpet that will be.
3) How much full-width carpet he will have left on the last roll.
He charges for his carpet by the metre, so he only works in the whole metre lengths. In other words even if he only needed 1.6 meters of carpet for the room, he would charge the customer for 2 meters because he has to discard the unused part of the metre.
Must include: The program must be simple and something like a form that can be filled in. Keyboard input. Screen output. Looping. Iteration. Decisions/selection. Arithmetic and data validation.
Example:
Imagine that he has to carpet a room that is 11 meters wide and 15 meters long.Each roll of carpet is 5 meters wide by 30 metres long when it is unrolled.
Therefore, this room will need 3 strips of carpet. Each strip will be 15 metres long. The first two strips will be the fill 5 metres wide, but the final strip will have to be cut so that it is only 1 metre wide.
Your help is GREATLY appreciated
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|