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

Разделы > Ad-Hoc > задача:


50375 - Area of Circles

Гость
• Вопросы к жюри (1)

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

• 50294 - Centimeters to Yards
• 50298 - Coins
• 50303 - Pattern
• 50882 - FizzBuzz
• 50322 - Snake Pattern
• 50302 - Paper Scissors Rock
• 50312 - Sales Bar Chart
• 50313 - Pattern Displays
• 50375 - Area of Circles
• 50393 - Palindromic Numbers
• 50396 - Cinema Tickets - 1
• 50325 - How much time passed?
• 50366 - Student Averages (2 Grades)
• 50406 - Draw Pattern 178
• 50416 - Placing Dominoes on Chess...
• 50477 - Character Pyramids
• 50498 - K-Means

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

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

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Prepared by Ibrahim Mesecan.

Area of Circles

Note: This question has been designed for C & C++. It will not work for other programming languages.
Question: Assume that you are given the following functions and constant PI in the header file areaofCircle.h :

  • const double PI=3.14159;
  • double Area(int radius); // calculates the area of a circle with the given radius
  • bool Continue(); // asks to the user if he wants to continue or not. If the user
  •           // says 'y' it returns true, it returns false otherwise
  • int getRadius(); // this function gets radius from keyboard
  • void showResult(double area); // shows the result on screen

Using the functions above in your program, calculate and show the area as far as the function Continue(); produces true, (the user enters 'y').
Note: For C and C++, you can include the functions using the following statement.
  #include "utils/areaofCircle.h"

Input specification
You will get the input through the function getRadius();

Output specification
You will show the result through the function showResult(double area);

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

www.contester.ru