Fencing the Ground

Can Anyone Solve it ?

The college ground is rectangular in shape. The Management decides to build a fence around the ground. In order to help the construction workers to build a straight fence, they planned to place a thick rope around the ground. They wanted to buy only the exact length of the rope that is needed. They also wanted to cover the entire ground with a thick carpet during rainy season. They wanted to buy only the exact quantity of carpet that is needed. They requested your help.

Can you please help them by writing a C program to find the exact length of the rope and the exact quantity of carper that is needed?

Input consists of 2 integers. The first integer corresponds to the length of the ground and the second integer corresponds to the breadth of the ground.


Sample Input and Output:
Enter the length of the ground
50
Enter the width of the ground
20
The length of the rope  140m
The quantity of carpet  1000sqm
 
Post Author

Unknown

We share resources which would help recover your mobiles, computers and also update new information about latest information and launches of products making you up to date.

No comments :

Post a Comment