Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- float x, y, m;
- cout << "masa(kg)="; cin >> x;
- cout << "inaltime(m)="; cin >> y;
- m = x / (y * y );
- if (m < 18.5)
- {
- cout << "Risc minim pentru sanatate" << endl;
- cout << "IMC=" << m << endl;
- }
- if (m >= 18.5&&m < 25)
- {
- cout << "Risc minim/scazut pentru sanatate" << endl;
- cout << "IMC=" << m << endl;
- }
- if (m >= 25 && m < 30)
- {
- cout << "Risc scazut/moderat pentru sanatate" << endl;
- cout << "IMC=" << m << endl;
- }
- if (m >= 30 && m < 35)
- {cout << "Risc minim pentru sanatate" << endl;
- cout << "IMC=" << m << endl;
- }
- if (m>=35)
- {
- cout << "Risc ridicat pentru sanatate" << endl;
- cout << "IMC=" << m << endl;
- }system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement