I need some pointers again. The program is suppose to be a for loop with nested decision. I'm have a problem with layout and organization. The program will run, but will not do any calculations until the last loop. I'm just not getting how to incorporate the functions.
#include <iostream>
#include <cmath>
using namespace std;
void getdata (int, int, char &, int &, int &, int &);
float HatSize (int, int, int);
int JacketSize (int, int, int);
int WaistSize (int);
int main (void)
{
char clothcode ;
int weight, heightft, heightin, J, W ;
float H ;
int count, i ;
getdata (count, i, clothcode, weight, heightft, heightin);
H = HatSize (weight, heightft, heightin);
J = JacketSize (heightft, heightin, weight);
W = WaistSize (weight);
in get data, every time it loops it changes the values that are being "returned" by reference parameter. You should instead only do it once, and have a loop in main.
//Thanks Gumbercules I get it, here is my progress.
#include <iostream>
#include <cmath>
using namespace std;
void getdata (int, int, char &, int &, int &, int &);
float HatSize (int, int, int);
int JacketSize (int, int, int);
int WaistSize (int);
int main (void)
{
char clothcode ;
int weight, heightft, heightin, J, W ;
float H ;
int count, i ;
cout << "This program will calculate clothing sizes.\n" ;
cout << "Enter how many times this program will execute:" ;
cin >> i ;
count = 0;
count = count + i;
for (count = 0; count < i; count++)
{
getdata (count, i, clothcode, weight, heightft, heightin);
H = HatSize (weight, heightft, heightin);
J = JacketSize (heightft, heightin, weight);
W = WaistSize (weight);