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...

  • On August 1, 2018, the beginning of its current fiscal year, the following opening account balances,...

    On August 1, 2018, the beginning of its current fiscal year, the following opening account balances, listed in alphabetical order, were reported by Tobique Ltd. Accounts payable $2,500 Interest receivable 20 Accounts receivable 4,740 Note receivable, due October 31, 2018 4,000 Accumulated depreciation—equipment 2,030 Retained earnings 6,040 Cash 5,520 Salaries payable 1,460 Common shares 12,000 Supplies 1,030 Equipment 10,100 Unearned revenue 1,380 During August, the following summary transactions were completed. Aug. 1 Paid $440 cash for advertising in local newspapers....

  • 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...

  • 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...

  • Please help by writing a MATLAB Code for the this lab Fourier Series Synthesis You will...

    Please help by writing a MATLAB Code for the this lab Fourier Series Synthesis You will consider five continuous-time signals 1- 2- for A D 4- We were unable to transcribe this imageWe were unable to transcribe this imager(t) e-t for-1 < t > 1 x(t) 2 2 4 3 3 x(t) -4 2 2 4 2 1, 0sts be a periodic signal with fundamental period T = 2 and Fourier coefficients ak. (a) Determine the value of ao (b)...

  • On August 1, 2018, the beginning of its current fiscal year, the following opening account balances,...

    On August 1, 2018, the beginning of its current fiscal year, the following opening account balances, listed in alphabetical order, were reported by Tobique Ltd. Accounts payable $2,500 Interest receivable 20 Accounts receivable 4,740 Note receivable, due October 31, 2018 4,000 Accumulated depreciation—equipment 2,030 Retained earnings 6,040 Cash 5,520 Salaries payable 1,460 Common shares 12,000 Supplies 1,030 Equipment 10,100 Unearned revenue 1,380 During August, the following summary transactions were completed. Aug. 1 Paid $440 cash for advertising in local newspapers....

  • We were unable to transcribe this imageThese scores would be easier to visualize and interpret if...

    We were unable to transcribe this imageThese scores would be easier to visualize and interpret if they were graphed as a histogram. To do that, we first need to group them into class intervals and present them as a frequency distribution of grouped scores Table 2 divides the range of these 25 schools' academic performance into ten intervals. Based on the information provided in Table 1, use the dropdown menus to fill in the rest of Table 2 and complete...

  • 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...

  • 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...

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