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. Help them by writing a C program to find the exact length of the rope and the exact quantity of carper that is required? Input Format: 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. Output Format: Refer Sample Input and Output for exact formatting specifications. Sample Input and Output: [All text in bold corresponds to input and the rest corresponds to output] Length: 50 Width: 20 Required length is 140m Required quantity of carpet is 1000sqm
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.
Help them by writing a C
Input Format:
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.
Output Format:
Refer Sample Input and Output for exact formatting specifications.
Sample Input and Output:
[All text in bold corresponds to input and the rest corresponds to output]
Length:
50
Width:
20
Required length is 140m
Required quantity of carpet is 1000sqm
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images