Advertisement
adventuretimeh

trapezio

Nov 21st, 2019
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  5.  
  6. int main(int argc, char *argv[]) {
  7.     int B,b,h;
  8.     int area;
  9.     printf("valore base maggiore");
  10.     scanf("%d",&B);
  11.     printf("valore base minore");
  12.     scanf("%d",&b);
  13.     printf("valore dell altezza");
  14.     scanf("%d",&h);
  15.     area=(B+b)*h/2;
  16.     printf("trapezio vale %d",area);
  17.    
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement