Friday, February 1, 2019

Area and Perimeter of Circle

  • Problem Description

    Program to calculate area and perimeter of circle
    Note:
    Define pi as 3.14
  • CODING ARENA
  • m=int(input())
    a=3.14*m*m
    p=3.14*2*m
    print("Area=",round(a,2))
    print("Perimeter=",round(p,2))
  • Test Case 1

    Input (stdin)
    11
    
    
    Expected Output
    Area= 379.94
    
    Perimeter= 69.08
  • Test Case 2

    Input (stdin)
    9
    
    
    Expected Output
    Area= 254.34
    
    Perimeter= 56.52

No comments:

Post a Comment