Computer Science, asked by wwwkushalsadhu0602, 7 months ago

write a basic program to find and display the area and perimeter of a rectangular field in its length is 200m breadth is 150m

Answers

Answered by anindyaadhikari13
33

Question:-

Write a basic program to find and display the area and perimeter of a rectangular field whose length 200m and breadth is 150m.

Code:-

Here is the code written in java language.

class Perimeter

{

public static void main(String args[])

{

int a=200,b=150;

int p=2*(a+b);

System.out.println("Perimeter of the rectangle is: "+p+"m");

}

}

Similar questions