write a programme and display the area of a rectangle when length is 20 cm and breadth is 12 cm. Area =length×breadth. java programme
Answers
Answered by
0
This is the Answer of the Question:
Attachments:
Answered by
0
/*
Project Type: Brainly Answer
Date Created: 22-02-2021
Date Edited Last Time: ---NIL---
Question Link: Java program to find the area of rectangle.
( length=20 cm)( breadth = 12 cm)(area = L × B)
Program Created By: atrs7391
Programming Language: Java
Language version (When program created or last edited): jdk-15.0.2
*/
package Brainly_Answers.Program;
public class Area_2 {
public static void main(String[] args) {
int length = 20;
//storing value of length
int breadth = 12;
//storing value of breadth
int area = length*breadth;
//calculating area
System.out.println("Area = "+area+"cm2");
//printing area
}
}
Similar questions