You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
309 B

  1. #include <stdio.h>
  2. int run_bmi()
  3. {
  4. float var1 = 0;
  5. float var2 = 0;
  6. printf("\nBMI-Rechner\n\nGeben Sie ihre Groesse in m an(Bsp: 1.8): ");
  7. scanf("%f", &var1);
  8. printf("\nGeben Sie ihr Gewicht in kg an: ");
  9. scanf("%f", &var2);
  10. printf("\nIhr Body-Mass-Index liegt bei %.2f\n", var2 / (var1 * var1));
  11. }