Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. //Joshua Alibrando
  2. //Mr Mink..Final class of the week
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. double Hat_Size(double weight, double height);
  7. double Jacket_size(double height, double weight, double age);
  8. double waist_size(double weight, double age);
  9.  
  10. int main()
  11. {
  12. double Hat_size(1), Jacket_size(1), Waist_size(1);
  13. double height, weight, age;
  14. double choice;
  15. do {
  16. cout << "Welcome to Digital Tailor!" << endl;
  17. cout << "Give me your height in inches, weight in pounds, and age in years." << endl;
  18. cout << "and I will give you your hat size, jacket size(inches at chest)" << endl;
  19. cout << "and your waist size in inches." << endl;
  20. cin >> height;
  21. cin >> weight;
  22. cin >> age;
  23.  
  24. cout.setf(ios::fixed);
  25. cout.setf(ios::showpoint);
  26. cout.precision(2);
  27.  
  28. cout << "Hat size = " << Hat_size;
  29. cout << "Jacket size = " << Jacket_size;
  30. cout << "Waist size (in inches) = " << Waist_size;
  31.  
  32. cout << "would you like to do try another? Type N or Y";
  33.  
  34. cin >> choice;
  35.  
  36. } while (choice = 'y');
  37.  
  38. system("pause");
  39. return 0;
  40. }
  41. double Hat_size(double weight, double height)
  42. {
  43. return ((weight / height)*2.9);
  44. }
  45. double Jacket_size(double height, double weight, double age)
  46. {
  47. double age_compute, jacket_size(0);
  48.  
  49. ((height*weight) / 288);
  50. if (age >= 40)
  51. {
  52. (age_compute = age - 30);
  53. }
  54. while (age_compute >= 10);
  55. (jacket_size + .125);
  56. return jacket_size;
  57. }
  58. double Waist_size(double weight, double age)
  59. {
  60. double age_compute, waist_size(0);
  61. (waist_size = weight / 5.7);
  62. if (age >= 30);
  63. {
  64. age_compute = age - 30;
  65. }
  66. while (age_compute >= 2);
  67. (waist_size + .1);
  68. return waist_size;
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement