Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int main()
- {
- float waga;//kg
- int wzrost;//cm
- float BMI;
- cout << "Podaj swoja wage w kilogramach" << endl;
- cin >> waga;
- cout << "Podaj swoj wzrost w centrymetrach" << endl;
- cin >> wzrost;
- BMI = (waga / (wzrost*wzrost)*10000);
- cout << BMI << endl;
- if (BMI < 16) {
- cout << "WYGLODZENIE" << endl;
- }
- if ((BMI >= 16) && (BMI <= 16.99)) {
- cout << "WYCHUDZENIE" << endl;
- }
- if ((BMI >= 17) && (BMI <= 18.49)) {
- cout << "NIEDOWAGA" << endl;
- }
- if ((BMI >= 18.5) && (BMI <= 24.99)) {
- cout << "WARTOSC PRAWIDLOWA" << endl;
- }
- if ((BMI >= 25) && (BMI <= 29.99)) {
- cout << "NADWAGA" << endl;
- }
- if ((BMI >= 30) && (BMI <= 34.99)) {
- cout << "I STOPIEN OTYLOSCI" << endl;
- }
- if ((BMI >= 35) && (BMI <= 39.99)) {
- cout << "II STOPIEN OTYLOSCI" << endl;
- }
- if (BMI >= 40) {
- cout << "OTYLOSC SKRAJNA" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement