Computer Science, asked by moulya62, 5 months ago


how to Create a program to find the area of Rectangle.

2. Create a program to find the area of Square.

please answer my question

Answers

Answered by Imblank
1

Answer:

You haven't written in which language so I'm just writing logic

//Rectangle

int length,breadth

Take input of length and breadth

print(length*breadth)

//Square

int side

Take input of side

print(side*side)

Read my bio once

Answered by sidhantsky
1

Answer:

import java.util.*;

public class sky

{

public static void main (string []args)

{

int l,b,s;

double rect,squa;

Scanner in=new Scanner (System.in);

System.out.println("enter the value of l,b and s);

l=in.nextInt();

b=in.nextInt();

s=in.nextInt();

rect=l*b;

squa=math.sqrt(s,2) ;

System.out.println("area of rectangle"+rect);

System.out.println("area of square"+squa);

}

}

Similar questions