Help! Urgent. I can not display the results in this personality test.

#include <iostream>
#include <conio.h>
#include <stdlib.h>

using namespace std;

int getA();
int getB();
int getC();
int solveA(int a,int b,int c);
int solveB(int a,int b,int c);
void display(int solveA, int solveB);



int main()
{


display(solveA(getC(),getB(),getA()),solveB(getC(),getB(),getA()));


getch();
return 0;
}


int getA()
{
int a;
system("CLS");
cout<<" A. What item are you most likely to have with you 24/7?\n\n\t1-A purse\n\t2-A wallet\n\t3-A hat(baseball, etc.)\n\t4-A cellphone";
cout<<endl<<endl<<" Key in your choice: ";
cin>>a;
return a;
}

int getB()
{
int b;
system("CLS");
cout<<" B. What do you like to do in your free time?\n\n\t1-Reading\n\t2-Sports\n\t3-Shopping\n\t4-Watching TV all day";
cout<<endl<<endl<<" Key in your choice: ";
cin>>b;
return b;
}

int getC()
{
int c;
system("CLS");
cout<<" C. What is your room like?\n\n\t1-Spotless!\n\t2-I can't even see my floor\n\t3-IDK I'm scared of the rats in my closet so I never go in there\n\t4-It's kinda messy but not too bad";
cout<<endl<<endl<<" Key in your choice: ";
cin>>c;
return c;
}

int solveA(int a,int b,int c)
{

int solveA,solveB;
int sumG,sumB,tsumB,tsumG;
sumG=0;
sumB=0;

if(a==1)
{
tsumG=sumG+2;
}

else if(a==2)
{
tsumG=sumG+1;
tsumB=sumB+1;
}

else if(a==3)
{
tsumB=sumB+2;
}

else if(a==4)
{
tsumG=sumG+1;
tsumB=sumB+1;
}

else
{
system("CLS");
int getA();

}



if(b==1)
{
tsumG=sumG+1;
tsumB=sumB+1;
}

else if(b==2)
{
tsumB=sumB+2;
}

else if(b==3)
{
tsumG=sumG+2;
}

else if(b==4)
{
tsumG=sumG+1;
tsumB=sumB+1;
}

else
{
system("CLS");
int getB();

}


if(c==1)
{
tsumG=sumG+2;
}

else if(c==2)
{
tsumB=sumB+2;
}

else if(c==3)
{
tsumG=sumG+1;
tsumB=sumB+1;
}

else if(c==4)
{
tsumG=sumG+1;
tsumB=sumB+1;
}

else
{
system("CLS");
int getC();

}


solveA=(tsumG/(3*2))*100;
return solveA;

}

int solveB(int a, int b, int c)

{
int solveA,solveB;
int sumG,sumB,tsumB,tsumG;
sumG=0;
sumB=0;

if(a==1)
{
tsumG=sumG+2;
}

else if(a==2)
{
tsumG=sumG+1;
tsumB=sumB+1;
}

else if(a==3)
{
tsumB=sumB+2;
}

else if(a==4)
{
tsumG=sumG+1;
tsumB=sumB+1;
}

else
{
system("CLS");
int getA();

}



if(b==1)
{
tsumG=sumG+1;
tsumB=sumB+1;
}

else if(b==2)
{
tsumB=sumB+2;
}

else if(b==3)
{
tsumG=sumG+2;
}

else if(b==4)
{
tsumG=sumG+1;
tsumB=sumB+1;
}

else
{
system("CLS");
int getB();

}


if(c==1)
{
tsumG=sumG+2;
}

else if(c==2)
{
tsumB=sumB+2;
}

else if(c==3)
{
tsumG=sumG+1;
tsumB=sumB+1;
}

else if(c==4)
{
tsumG=sumG+1;
tsumB=sumB+1;
}

else
{
system("CLS");
int getC();

}


solveB=(tsumB/(3*2))*100;
return solveB;


}


void display(int solveA,int solveB)
{
system("CLS");
cout<<"\n\n\tYou are "<<solveA<<"% Girly and "<<solveB<<"% Manly!";
}
Last edited on
void printmessage(solve())

This is wrong. The bit between the brackets should be a type and name of the input parameter.

Edit: Changing your OP after people have answered kind of wrecks it.
Last edited on
It is interesting what does mean the words "I can not display the results "?

And what does mean the following declaration in the code block

else
{
system("CLS");
int getA();

}

What is the sense of it?!
Topic archived. No new replies allowed.