program runs but does not give me a result..

//DEBUG2 Program
//This program asks the user for an insurance code, then validates it.
//An insurance code between 10 and 99 inclusive is valid.
#include<iostream.h>

int main()
{
int insCode;
int valid;
int validateCode(int insCode);
cout<<"\nPlease enter insurance code ";
cin>>insCode;
validateCode(insCode);
if(valid)
cout<<"\nValid code";
else
cout<<"\nInvalid code";
}
int validateCode(int code)
{
int valid = 0;
if(code>=10 && code<=99)
valid=1;
return(0);

system("pause");

}
Please do not double post, you already have a topic here:
http://www.cplusplus.com/forum/beginner/97722/
Topic archived. No new replies allowed.