Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Joshua Alibrando
- //Mr Mink..Final class of the week
- #include <iostream>
- using namespace std;
- double Hat_Size(double weight, double height);
- double Jacket_size(double height, double weight, double age);
- double waist_size(double weight, double age);
- int main()
- {
- double Hat_size(1), Jacket_size(1), Waist_size(1);
- double height, weight, age;
- double choice;
- do {
- cout << "Welcome to Digital Tailor!" << endl;
- cout << "Give me your height in inches, weight in pounds, and age in years." << endl;
- cout << "and I will give you your hat size, jacket size(inches at chest)" << endl;
- cout << "and your waist size in inches." << endl;
- cin >> height;
- cin >> weight;
- cin >> age;
- cout.setf(ios::fixed);
- cout.setf(ios::showpoint);
- cout.precision(2);
- cout << "Hat size = " << Hat_size;
- cout << "Jacket size = " << Jacket_size;
- cout << "Waist size (in inches) = " << Waist_size;
- cout << "would you like to do try another? Type N or Y";
- cin >> choice;
- } while (choice = 'y');
- system("pause");
- return 0;
- }
- double Hat_size(double weight, double height)
- {
- return ((weight / height)*2.9);
- }
- double Jacket_size(double height, double weight, double age)
- {
- double age_compute, jacket_size(0);
- ((height*weight) / 288);
- if (age >= 40)
- {
- (age_compute = age - 30);
- }
- while (age_compute >= 10);
- (jacket_size + .125);
- return jacket_size;
- }
- double Waist_size(double weight, double age)
- {
- double age_compute, waist_size(0);
- (waist_size = weight / 5.7);
- if (age >= 30);
- {
- age_compute = age - 30;
- }
- while (age_compute >= 2);
- (waist_size + .1);
- return waist_size;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement