Write a Java program to find the area of Rectangle and Circle . - Pratik Ghelani

Pratik Ghelani

Breaking

Tuesday, January 22, 2019

Write a Java program to find the area of Rectangle and Circle .

Program:-

public class p2ae {
public static void main(String[] args) {
double l=10;
double w=20;
double a=l*w;
double pi=3.14;
double r=48;
double c=pi*r*r;
System.out.println("Area of Rectangle :- " +a);
System.out.println("Area of Circle :- " +c);
}  

Output:-





No comments:

Post a Comment