fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.  
  5. int Gewicht=0;
  6. float Groesse=0;
  7. float BMI;
  8.  
  9. printf("Bitte geben Sie Ihr Gewicht und Ihre Größe an!\n");
  10.  
  11. scanf("%d %f", &Gewicht, &Groesse);
  12.  
  13.  
  14. BMI = Gewicht/(Groesse*Groesse);
  15.  
  16. printf("Ihr Body-Mass-Index ist ");
  17. printf("%f \n",BMI);
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 2164KB
stdin
60 1.70
stdout
Bitte geben Sie Ihr Gewicht und Ihre Größe an!
Ihr Body-Mass-Index ist 20.761244