Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- float masa;
- float wzrost;
- float bmi;
- int main()
- {
- cout << "Podaj swoja wage(kg)" << endl;
- cin >> masa;
- cout << "Podaj swoj wzrost(m)" << endl;
- cin >> wzrost;
- bmi = masa / pow(wzrost, 2);
- if(bmi >= 25)
- {
- cout << "Masz nadwage" << endl;
- }
- else if(bmi < 25 && bmi >= 18)
- {
- cout << "Masz ok wage" << endl;
- }
- else
- {
- cout << "Masz niedowage" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement