Write a c++ program to take value of length and breadth of a rectangle from user and check it is square or not
Answers
Answered by
0
Answer:
Explanation:
Code:-
import java.util.*;
class CheckIf
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter the length: ");
double l=sc.nextDouble();
System.out.println("Enter the breadth: ");
double b=sc.nextDouble();
if(l==b)
System.out.println("Square...");
else
System.out.println("Not a Square...");
}
}
Similar questions