Advertisement
adventuretimeh

due lati

Jan 11th, 2020
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.52 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  4. int main(int argc, char *argv[]) {
  5.     int a,b,p,A;
  6.     printf("dammi due lati");
  7.     scanf("%d",&a);
  8.      printf("dammi due lati");
  9.     scanf("%d",&b);
  10.     if(a==b)
  11.     {
  12.         printf("quadrato");
  13.     }
  14.     else
  15.     {
  16.         printf("rettangolo");
  17.     }
  18.     p=(a+b)*2;
  19.     printf("perimetro vale %d",p);
  20.     A=a*b;
  21.     printf("area vale %d",A);
  22.    
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement