Computer Science, asked by ndndnfj, 11 months ago

write a program that accepts radius of a cricle and print its area ? ( class 11 ip)​

Answers

Answered by FammyMirza
3

Answer:

If we know the radius then we can calculate the area of a circle using the formula: A=πr² (Here A is the area of the circle and r is radius). In this python program, we will find the area of a circle using radius.

# Python Program to find Area Of Circle using Radius

PI = 3.14

radius = float(input(' Please Enter the radius of a circle: '))

area = PI * radius * radius

circumference = 2 * PI * radius

print(" Area Of a Circle = %.2f" %area)

print(" Circumference Of a Circle = %.2f" %circumference)

ANALYSIS: We defined pi as a global variable and assigned value as 3.14. This program allows the user to enter the value of a radius and then it will calculate the area of a circle as per the formula.

OUTPUT

Python Program to find Area Of Circle using Radius

is giving on the top.

if its helpful then mark me as brilliant.

Attachments:
Answered by anishdusad29
1

Answer:

It's in Java

import java.util.Scanner;

class Example

{

public static void main(String[] args)

{

Scanner scan = new Scanner(System.in);

int r;

System.out.println("Please enter radius");

r =scan.nextInt();

int area;

int π=1.414;

area = πr^2;

System.out.println("Area ="+area");

}

}

Similar questions