Write a program to accept length and breadth of a rectangle and display its area.
Dont spam
And be the brainliest
Answers
Answered by
3
Explanation:
C Program
- #include <stdio.h>
- int main()
- {
- int width=5;
- int height=10;
- int area=width*height;
- printf("Area of the rectangle=%d",area);
- }
Answered by
0
Answer:
import java.util.*;
class Area{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int len,br,area;
System.out.println("enter the length and breadth of rectangle");
len=sc.nextInt();
br=sc.nextInt();
area=len*br;
System.out.println("Area = "+area);
} // end of main
} // end of class
Explanation:
coding type java by using scanner class
len is for taking input of length and br for breadth of rectangle
Hope it will help you .
Similar questions
Math,
18 days ago
History,
18 days ago
Math,
18 days ago
Computer Science,
9 months ago
Social Sciences,
9 months ago