Write a JAVA program to find the area and perimeter of a square and rectangle. Store side in s , length as ‘ln’ and breadth as ‘b’

Question

Write a JAVA program to find the area and perimeter of a square and rectangle. Store side in s , length as ‘ln’ and breadth as ‘b’. display the results in separate lines.​ DO NOT USE ANY INPUT METHOD​

in progress 0
Kinsley 5 months 2021-06-30T08:30:12+00:00 1 Answers 0 views 0

Answers ( )

    0
    2021-06-30T08:31:53+00:00

    Answer:

    NOTE – You have said don’t use any input method then I am talking random values.

    import static java.lang.System.out;

    public class Geometry

    {

    public static void main() {

    int l = 5 , b = 5;

    int s = 6;

    out.print(“Area of Rect”+(l*b));

    out.print(“Perimeter of Rect”+(2*(l*b)));

    out.print(“Area of Square”+(s*s));

    out.print(“Perimeter of Square “+(4*s));

    }

    }

Leave an answer

Browse

9:3-3+1x3-4:2 = ? ( )