Computer Science, asked by bittuyadav1362, 1 month ago

Write a program to accept length and breadth of a rectangle and display its area.




Dont spam


And be the brainliest ​

Answers

Answered by sedara652
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 mohammadadnan7
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