c++ temporary variable explanation
===

i've searched what does it mean by temporary variable but i couldn't & i couldn't understand. i've done the if-else structures without a temporary variable and now i'm trying to do if-else structure and a temporary variable. I couldn't find the difference.

the question is to

 1. write a program that reads three integers(a,b and c) and prints the largest of values using if else structure and a temporary variable.
 2. if else structures without a temporary variable.

I've done the first question.

    #include <iostream>
    #include <conio.h>
    using namespace std;
    int main()
    {
	int a,b,c;

	cout<<"a : ";
	cin>>a;
	cout<<"b : ";
	cin>>b;
	cout<<"c : ";
	cin>>c;

	if(a>b && a>c)
	{
		cout<<"largest : "<<a;
	}else{
		if(b>a && b>c)
		{
			cout<<"largest : "<<b;
		}else{
			if(c>a && c>b)
			{
				cout<<"largest : "<<a;
			}else{
				cout<<"error!";
			}
		}
	}


	getch();
	return 0;
    }


but for the second question is it like this?

    #include <iostream>
    #include <conio.h>
    using namespace std;
    int main()
    {
	int a,b,c;
	int max;

	cout<<"a : ";
	cin>>a;
	cout<<"b : ";
	cin>>b;
	cout<<"c : ";
	cin>>c;


	if(a>b && a>c)
	{
		max=a;
		cout<<"largest : "<<max;
	}else{
		if(b>a && b>c)
		{
			max=b;
			cout<<"largest : "<<max;
		}else{
			if(c>a && c>b)
			{
				max=c;
				cout<<"largest : "<<max;
			}else{
				cout<<"error!";
			}
		}
	}


	getch();
	return 0;
    }



i just want to be confirm because i don't exactly understand what does it mean by temporary variable.
thanks.