seergiomv

ejercicio 5.1

Sep 30th, 2019
173
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 main() {
  4.     float b, h;
  5.     printf("Introduce la base del rectángulo: ");
  6.     scanf("%f", &b);
  7.     printf("Introduce la altura del rectángulo: ");
  8.     scanf("%f", &h);
  9.     float s;
  10.     s = b*h;
  11.     printf("La superficie de su rectángulo de base %.2f y altura %.2f es: %.2f", b, h, s);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment