seergiomv

ejercicio 9.1

Oct 1st, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     char n[50];
  5.     int e, h;
  6.     float s, total;
  7.     printf("Nombre: ");
  8.     scanf("%s", &n);
  9.     printf("Edad: ");
  10.     scanf("%d", &e);
  11.     printf("Número de hijos: ");
  12.     scanf("%d", &h);
  13.     printf("Sueldo anual: ");
  14.     scanf("%f", &s);
  15.     total = s / 12;
  16.     printf("Nombre:%s \n", n);
  17.     printf("Edad:%d \n", e);
  18.     printf("Número de hijos:%d \n", h);
  19.     printf("Sueldo mensual:%.2f \n", total);
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment