seergiomv

ejercicio 3.1

Sep 30th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     float b, h;
  5.     printf("Introduce la base del triángulo: ");
  6.     scanf("%f", &b);
  7.     printf("Introduce la altura del triángulo: ");
  8.     scanf("%f", &h);
  9.     float t;
  10.     t = (b * h)/2;
  11.     printf("La superficie del triángulo de bas %f y altura %f es: %f", b, h, t);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment