Advertisement
rdc98

Untitled

Feb 24th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. float x, y, m;
  6. cout << "masa(kg)="; cin >> x;
  7. cout << "inaltime(m)="; cin >> y;
  8. m = x / (y * y );
  9. if (m < 18.5)
  10. {
  11. cout << "Risc minim pentru sanatate" << endl;
  12. cout << "IMC=" << m << endl;
  13. }
  14. if (m >= 18.5&&m < 25)
  15. {
  16. cout << "Risc minim/scazut pentru sanatate" << endl;
  17. cout << "IMC=" << m << endl;
  18. }
  19. if (m >= 25 && m < 30)
  20. {
  21. cout << "Risc scazut/moderat pentru sanatate" << endl;
  22. cout << "IMC=" << m << endl;
  23. }
  24. if (m >= 30 && m < 35)
  25. {cout << "Risc minim pentru sanatate" << endl;
  26. cout << "IMC=" << m << endl;
  27.  
  28. }
  29. if (m>=35)
  30. {
  31. cout << "Risc ridicat pentru sanatate" << endl;
  32. cout << "IMC=" << m << endl;
  33. }system("pause");
  34. return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement