Advertisement
kamandos

HomeWork

Jul 15th, 2022
663
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int a;          
  4. int b;          
  5.  
  6. int area;          
  7. int perimeter;      
  8.  
  9. int main() {
  10.     b = 7;
  11.     a = 5;
  12.  
  13.     perimeter = 2*(a + b);
  14.     printf("Perimeter of the rectangle = %d inches\n", perimeter);
  15.    
  16.     area = a * b;
  17.     printf("Area of the rectangle = %d square inches\n", area);
  18.  
  19. return(0);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement