Advertisement
mabwehz

areaOfRectangle

Apr 4th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3.  
  4. int main()
  5. {
  6.    
  7.     int length, width, area;
  8.  
  9.     printf("==AREA OF A RECTANGLE CALCULATOR==\n");
  10.     printf("Enter the length of the rectangle: ");
  11.     scanf("%d", &length);
  12.     printf("Enter the width of the rectangle: ");
  13.     scanf("%d", &width);
  14.    
  15.     area = length * width;
  16.    
  17.     printf("The area of a triangle with length %d and width %d is: %d", length, width, area);
  18.    
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement