Computer Science, asked by srijitamome, 19 days ago

Draw a flowchart showing how to calculate and print the area of square and rectangle​

Answers

Answered by Anonymous
1

Answer:

here's your answer for square, for rectangle change one length to breath that is length*breath

Explanation:

HOPE THIS HELPS YOU

PLS MARK ME AS THE BRIANLIEST

Attachments:
Answered by samarthkrv
0

Answer:

powershell program-

[int]$side = Read-Host "Enter the length of the side of the square"

[int]$area = $side*$side

"The area of the square is " + $area

#Rectangle

[int]$side = Read-Host "Enter the length rectangle"

[int]$side1 = Read-Host "Enter the breadth of the rectangle"

[int]$area = $side*$side1

"The area of the rectangle is " + $area

java-

import java.util.*;

public class Main

{

public static void main(String[] args) {

 Scanner sc = new Scanner(System.in);

 System.out.println("Enter the length  of the square-");

 int len = sc.nextInt();

 System.out.println("The area is " + (len*len));

}

}

rectangle

import java.util.*;

public class Main

{

public static void main(String[] args) {

 Scanner sc = new Scanner(System.in);

 System.out.println("Enter the length and breadth  of the rectangle-");

 int len = sc.nextInt();

 int bred = sc.nextInt();

 System.out.println("The area is " + (len*bred));

}

}

python-

square-

len = int(input("Enter length:"))

area = len*len

print("The area is" , area)

rectangle-

len = int(input("Enter length:"))

bred = int(input("Enter breadth:"))

area = len*bred

print("The area is" , area)

Explanation:

Similar questions