ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Геометрия > задача:


50422 - Area and Perimeter of different Shapes

Гость
• Обсуждение задачи (3)

Задачи раздела

• 50328 - How far away
• 50825 - Drawing Polygon
• 50508 - The Biggest Area
• 51034 - Area of 3 Shapes
• 50854 - Area of Triangle Revised
• 50669 - Area of an Irregular Polygon
• 50560 - Distanca maksimale
• 50237 - Is it the same color?
• 50422 - Area and Perimeter of ...
• 50399 - Mobile Base Station
• 50397 - The Number of Points in a ...
• 50349 - Area of a Triangle
• 50348 - Area and Perimeter of a Rec...
• 50665 - Площадь пересечения
• 50668 - Triangle
• 50362 - Pythagorean Numbers
• 50354 - Intersecting Rectangles

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
bfs. Сложность Альфа

Area and Perimeter of different Shapes

You will be given asked to chose a geometrical shape. (1: Circle, 2:Rectangle, 3: Isosceles Triangle) Calculate the area and perimeter of the selected object.

Question:
First ask for the Object Type;

  1. if 1 is given then ask for the radius and
    calculate the area and perimeter of the circle;
  2. if 2 is given then ask for the width and height and
    calculate the area and perimeter of the rectangle;
  3. if 3 is given then ask for the base and height of an isosceles Triangle
    calculate the area and perimeter of it

Input specification
You will be given an integer number (objType) where 1 ≤ objType ≤ 3, according to the given object type you will be given one (circle) or two integer numbers (rectangle or triangle).
Note: PI= 3.14159

Output specification
Find out the area and perimeter of the given shape. Your result should contain at most 3 decimal place after the floating point.

Sample Input I
  1
  5
Sample Input II
  3
  10 5
Sample Output I
  78.54 31.416
Sample Output II
  25 24.142


Для отправки решений необходимо выполнить вход.

www.contester.ru