Image

Imagecaching wrote in Imagecpp

what's up geeks. i'm new, but i have a question. it's fairly simple,
but since i'm a moron, i can't figure it out. my assignment (which is due like
tomorrow) was to prompt for 3 values, echo print those, and then arrange them
in regard to which is min and which is max.

here's what i have so far. i know that the if statements in the middle are wrong, thus
my program is garbage. it should be an easy fix. thanks for your help.



int main()
{

int a;
int b;
int c;
int max;
int min;

cout<<"Enter three numbers: ";
cin >> a;
cin >> b;
cin >> c;

cout<< endl << endl;

if(a
[Error: Irreparable invalid markup ('<b)>') in entry. Owner must fix manually. Raw contents below.]

what's up geeks. i'm new, but i have a question. it's fairly simple,
but since i'm a moron, i can't figure it out. my assignment (which is due like
tomorrow) was to prompt for 3 values, echo print those, and then arrange them
in regard to which is min and which is max.

here's what i have so far. i know that the if statements in the middle are wrong, thus
my program is garbage. it should be an easy fix. thanks for your help.

<lj-cut text="min and max">

int main()
{

int a;
int b;
int c;
int max;
int min;

cout<<"Enter three numbers: ";
cin >> a;
cin >> b;
cin >> c;

cout<< endl << endl;

if(a<b)
{
a = min;
b = max;
}
if(c>a)
{
c = min;
b = max;
}
else
{
c = max;
b = min;
}
if(b<c)
{
c = max;
b = min;
}
else
{
a = max;
}

cout<<setw(6)<<"A"
<<setw(6)<<"B";
cout<<setw(6)<<"C";
cout<<setw(6)<<"Min"
<<setw(6)<<"Max"<<endl;

cout<<setw(30)<<setfill('-') <<"-" << setfill(' ') << endl;

cout<<setw(6)<< a << setw(6) << b << setw(6) << c;
cout<<setw(6)<< min << setw(6) << max <<endl;

cout<<setw(30)<<setfill('-') <<"-" << setfill(' ')
<< endl <<endl;

return 0;
}

</lj-cut>

quick responses will be awarded with kind words and appreciation.