Write a algorithm to read length & bredth of room & print area.
"Auditorium" if area>2500
"Hall" if 500<= area<=2500
"Big room" if 150<area < 500
"Small room" if area<=150
Answers
Answered by
1
Answer:
import java.util.Scanner;
public class program {
public static void main(String[] args) {
Scanner sc = new scanner(System.in);
int x = sc.nextInt();
int n = sc.nextInt();
int area = x × n;
if (area>2500) {
System.out.println("Auditorium");
}
else is (500<=area<=2500) {
System.out.println("Hall");
}
else if (150<area<500) {
System.out.println("Big room");
}
else if (area<=150) {
System.out.println("Small room");
}
}
}
Similar questions