constructor basics1


Submit solution

Points: 10
Time limit: 1999.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
C++

OBJECTIVE

Create a class circle with data members as radius r, a constructor to initialize the radius value, and a member function perimeter( ) to calculate and display the perimeter of the circle.

Constraint

A code template is given with areas that you can edit. Complete the template and achieve the objective.

Input Format:

A single line containing radius value.

Output Format:

single line, with detailing the value of the variable.

NOTE:

You need not edit/worry about the input or output, the template will take care of that. Just fill in the code to complete the objective. Assume the pi value as 3.14.

Sample Input:

4

Sample Output:

The perimeter of the circle with radius 4 is 25.12


Comments

There are no comments at the moment.