All pastes #373904 Raw Edit

Untitled

public text v1 · immutable
#373904 ·published 2007-02-27 02:20 UTC
rendered paste body
#include <iostream>
#include <>
using namespace std;

// There will be three functions performing the
// Hat size, Jacket size, and Waist size calculations
// All of which are designated before and after main.

// Algorithm:
// Get the users height, weight, age.
// Caclculate the HatSize, JacketSize, and WaistSize
// given the coorelating formulas provided by Hare
// for each seperate formula making a function for each.


// hat func
struct HatSize
{
    double Ht, Wt;
};
HatSize GetInputs();
// PRE:
// POST:
double Sizes(double Ht, double Wt)


// jacket func
struct JacketSize
{
    double Ht, Wt, Age;
};
JacketSize GetInputs();
// PRE:
// POST:
double Sizes(double Ht, double Wt, double Age)


waist func
struct WaistSize
{
    double Ht, Wt, Age;
};
WaistSize GetInputs();
// PRE:
// POST:
double Sizes(double Ht, double Wt, double Age)

int main()
{
    double Ht, Wt, Age, CalcdHatSize, CalcdJacketSize, CalcdWaistSize ;

    cout << "What is your weight in pounds?" ;
    cin >> Wt
    cout << "What is your height in inches?" ;
    cin >> Ht
    cout << "What is your age in years?" ;
    cin >> Age


    return 0;
}

HatSize GetInputs()
{
    HatSize inputsHS;
    cout << "What is your weight in pounds?" ;
    cin >> Wt;
    cout << "What is your height in inches?" ;
    cin >> Ht;
    return inputsHS;
}

double Sizes(double Ht, double Wt, double Age)
{
    double CalcdHS;
    double R1
    CalcdHS = ((Wt /= Ht) *= 2.9)
    return R1;
}

JacketSize GetInputs()
{
    JacketSize inputsJS;
    cout << "What is your weight in pounds?" ;
    cin >> Wt;
    cout << "What is your height in inches?" ;
    cin >> Ht;
    cout << "What is your age in years?" ;
    cin >> Age;
    return inputsJS;
}

double Sizes(double Ht, double Wt, double Age)
{
    double CalcdJS;
    double 
    CalcdJS =
   // haven't started this one yet or the last one
    

WaistSize GetInputs()
{
    WaistSize inputsWS;
    cout << "What is your weight in pounds?" ;
    cin >> Wt;
    cout << "What is your height in inches?" ;
    cin >> Ht;
    cout << "What is your age in years?" ;
    cin >> Age;
    return inputsWS;
}