Question
Please give the correct code and typed.

4.2: Cyber Tailor full 10 years. So, there is no adjustment for ages 30 through 39, but 1/8 of an inch is added for age 40) a
Don’t give this wrong code.
media%2Fbd2%2Fbd23286d-aab0-40bf-92fc-d8
media%2F1c8%2F1c812060-79ac-473f-82c5-ac
0 0
Add a comment Improve this question Transcribed image text
Answer #1
#include<iostream>
#include<iomanip>
using namespace std;

double hat(double, double);     
double jacket(double, double, int);
double waist(double, int);

int main() {
        char option;
        double height, weight, hatSize, jacketSize, waistSize;
        int age;
        cout << fixed << showpoint;
        cout << setprecision(2);
        do {
                cout << "Enter your height (in inches), weight (in pounds) and age (in years) (separated by spaces): ";
                cin >> height >> weight >> age;
                hatSize = hat(weight, height);
                jacketSize = jacket(height, weight, age);
                waistSize = waist(weight, age);
                cout << "Hat size: " << hatSize << endl;
                cout << "Jacket size: " << jacketSize << endl;
                cout << "Waist size: " << waistSize << endl;
                cout << "Do you want to repeat process? ";
                cin >> option;
        } while (option == 'Y' || option == 'y');
        return 0;
}
double hat(double weight, double height) {
        return (weight / height)*2.9;
}
double jacket(double height, double weight, int age) {
        double size;
        double adjustment;
        size = (height*weight) / 288;
        if (age > 30) {
                adjustment = (age - 30) / 10;
                size += adjustment / 8;
        }
        return size;
}
double waist(double weight, int age) {
        double size;
        double adjustment;
        size = weight / 5.7;
        if (age > 28) {
                adjustment = (age - 28) / 2;
                size += adjustment / 10;
        }
        return size;
}

Add a comment
Know the answer?
Add Answer to:
Please give the correct code and typed. Don’t give this wrong code. 4.2: Cyber Tailor full...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Help! My math is wrong somewhere. Please explain throughly and give a correct answer! I’ve been...

    Help! My math is wrong somewhere. Please explain throughly and give a correct answer! I’ve been given wrong ones before :( 017 345,150 152,100 101,400 144,300 (206,700) (173,550) 61,300 312,000 We were unable to transcribe this imageWe were unable to transcribe this imageSepo Int 16e 253,550 Cash at

  • IN C++ PLEASE interest payment. Your program should use at least two function definitions and should...

    IN C++ PLEASE interest payment. Your program should use at least two function definitions and should allow the user to repeat this calculation as often as the user wishes. 2. Write a program that asks for the user's height, weight, and age, and then computes clothing sizes according to the formulas: Hat size weight in pounds divided by height in inches and all that multiplied by 2.9. Jacket size (chest in inches) - height times weight divided by 288 and...

  • Circuit Analysis: Need help writing this into MATLAB. I do not need it in paper I need help putting it into MATLAB. * DO NOT WRITE ON PAPER* Please use MATLAB and post your code. Thank you. My work c...

    Circuit Analysis: Need help writing this into MATLAB. I do not need it in paper I need help putting it into MATLAB. * DO NOT WRITE ON PAPER* Please use MATLAB and post your code. Thank you. My work completed. Please help me in make code for the above circuit ^. Here is my work for Part 3 that is needed to complete this part 4. ( could not solve the last part) Part 4. AC Solution by Phasor Analysis...

  • Four Star Video has been in the video rental business for five years. The following is...

    Four Star Video has been in the video rental business for five years. The following is a list of accounts for Four Star Video at May 31, 2017. It reflects the recurring transactions for the month of May but does not reflect any month-end adjustments. 1. For each of the items below, identify and analyze the necessary adjustment on May 31, 2017. a. Four Star rents a store in a shopping mall and prepays the annual rent of $7,200 on...

  • Please explain why the answer wrong 15 When originally purchased, a vehicle costing $23,940 had an...

    Please explain why the answer wrong 15 When originally purchased, a vehicle costing $23,940 had an estimated useful life of 8 years and an estimated salvage value o of straight-line depreciation, the asset's total estimated useful life was revised from 8 years to 6 years and there was no change in the estimated f $2100. After 4 years salvage value. The depreciation expense in year 5 equals: $2730.00. lde preciakancossidual vene vsek $10,920.00. $2898.00. $5628.00. 23,940- 2l00/2 236725 volue Atter...

  • help me please SITUATION G: A mast (weight 140N) has a hinged support at A. in...

    help me please SITUATION G: A mast (weight 140N) has a hinged support at A. in addition it is supported by two struts. Its upper end carries a weight (130N). 10) Determine the vertical reaction at A. A.) 70 N В.) Determine the horizontal reaction at A along y. 80 N C.) 90 N D.) 100 N 11) A.) 50 N 100 N Determine the forces in the struts. В.) C.) 150 N D.) 200 N 12) A.) 322.47 N...

  • volume of the box in for full credit 11) CALCULATIONS AND PROBLEMS Show all ORSERIE SIGNIFICANT...

    volume of the box in for full credit 11) CALCULATIONS AND PROBLEMS Show all ORSERIE SIGNIFICANT FIGURES RULES! in the correct number of What is the temperature recorded by the following thermometer significant figures? (5 ps) 1 inch 2. An unknown substance is soluble in alcohol and cyclohexane but not in water. It appears to melt between 50 and 55 degrees Celsius. When added to 500 ml. of water, a 2.30 sportion causes the volume to rise to 520 mL....

  • We were unable to transcribe this imageThis Quiz: 9 pts Question Hel The accompanying frequency polygon...

    We were unable to transcribe this imageThis Quiz: 9 pts Question Hel The accompanying frequency polygon represents the number of a country's residents below 100 years of age. Complete parts (a) through (1) below. la Click the icon to view the frequency polygon. (d) Which age group has the highest population? 3039 10-19 90_99 40-49 (e) Which age group has the lowest population? 80-89 90-99 0-9 ОО 30 39 (1) Which age group has 39 million? O 50-59 : More...

  • Good Luck. (Need to show all your work to get full credit; no work, no credit)...

    Good Luck. (Need to show all your work to get full credit; no work, no credit) 1.For the given sample data below: a Construct a frequency distribution using six classes for a sample data that includes. Class Limits (5 pts), Class Boundaries (6 pts), Frequency (3 pts), Relative frequency (3 pts), Cumulative Frequency (3 pts), Midpoint X.5 pts), f-x-(5 pts), f. (6 pts). b. For constructed grouped data find: mean (8 pts), mode for grouped data (2 pts), modal class...

  • can someone take a look to these 3 pictures and fill in the blanks. I need...

    can someone take a look to these 3 pictures and fill in the blanks. I need to show work and understand the answers. thank you! Birth to 36 months: Girls Head circumference-for-age and Welght-for-length percentiles NAME RECORD # Birth 3 69 12 15 18 21 24 27 30 33 36 AGE (MONTHS cm in ina cm 52 19--48 46 46-18 42 50 22 48 15--38 2044 19--42 18-40 38 36 34 -32 13 16 13 28 E 11 24 H...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT