Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. 2.13
  2. A) cin >> b >> c >> d >> e >> f;
  3.  
  4. 2.14
  5. E) a * (x * x * x) + ;
  6.  
  7. 2.21
  8. #include<iostream>
  9. using namespace std;
  10. int main()
  11. {
  12. cout<<"*********\n* *\n* *\n* *\n* *\n* *\n* *\n* *\n*********\n\n";
  13. cout<<" *** \n * * \n* *\n* *\n* *\n* *\n* *\n * * \n *** \n\n";
  14. cout<<" * \n *** \n*****\n * \n * \n * \n * \n * \n * \n\n";
  15. cout<<" * \n * * \n * * \n * * \n* *\n * * \n * * \n * * \n * \n\n";
  16. return 0;
  17. }
  18.  
  19. 2.30
  20. #include<iostream>
  21. using namespace std;
  22. int main()
  23. {
  24. int weight = 0, height = 0, BMI = 0;
  25. cout << "How much do you weigh in pounds?";
  26. cin >> weight;
  27. cout << "What is your height in inches?";
  28. cin >> height;
  29. BMI = ((weight * 703)) / ((height * height));
  30. cout << "Your BMI is" << BMI;
  31. if (BMI <= 18.5) {
  32. cout << "You're underweight\n";
  33. }
  34. if ((BMI > 18.5) && (BMI <= 24.9)) {
  35. cout << "You're Normal\n";
  36. }
  37. if ((BMI > 25) && (BMI <= 29.9)) {
  38. cout << "You're overweight\n";
  39. }
  40. if (BMI > 30) {
  41. cout << "You're obese\n";
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement