seergiomv

ejercicio 4.1

Sep 30th, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 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 p;
  10.     p = (b*2)+(h*2);
  11.     printf("El perímetro de su rectángulo de base %.2f y altura %.2f es: %.2f", b, h, p);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment