Code is copied!
Program to input 2 values length and breadth and check if it is a square or a rectangle JAVA
Write a Program to input 2 values length and breadth and check if it is a square or a rectangle.
import java.util.*;
class squarerectangle
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
int l = sc.nextInt();
int b = sc.nextInt();
if(l==b)
System.out.println("It is a square");
else
System.out.println("It is a rectangle");
}
}