I'm not sure what you mean by this, but if you mean the user enters something like 3956 and you want the int to take 39, here's one way to do it:
[code]
cout<<"Enter an integer: ";
int num;
cin>>num;
while(num>=100)
{
num/=10;
}
cout<<"The first two digits of your integer are: "<<num<<endl;
SolarFlare
Those who cling to life die and those who defy death live. -Sun Tzu
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.