inital commit, adding all school projects
This commit is contained in:
27
BMI/main.cpp
Normal file
27
BMI/main.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include <iostream>
|
||||
#include <windows.h>
|
||||
#include <iomanip>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
float BMI(float a, float b) {
|
||||
return a/(b*b);
|
||||
}
|
||||
|
||||
int main() {
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
cout << fixed << setprecision(2);
|
||||
|
||||
cout << "BMI-RECHNER" << endl;
|
||||
cout << "-----------" << endl;
|
||||
float Gewicht,Groesse;
|
||||
cout << "bitte geben Sie die geforderten Daten an!" << endl;
|
||||
cout << left << setw(20) << "Gewicht(in Kg):";
|
||||
cin >> Gewicht;
|
||||
cout << left << setw(22) << "Größe(in M):";
|
||||
cin >> Groesse;
|
||||
|
||||
cout << endl << "BMI: \t\t\t" << BMI(Gewicht, Groesse);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user