شرمنده.
این هم نوع دوم.
#include <iostream.h>
#include <conio.h>
#include <stdio.h>
int main()
{
long a, tmp, RtnVal[2][15];
int cZoj=0, cFard=0, c=0;
cin>>a;
while( a!=0)
{
tmp = a%10;
if( (c%2)==0 )
RtnVal[0][cZoj++] = tmp;
else
RtnVal[1][cFard++] = tmp;
a/=10;
c ++;
}
cout<<"\n adade radeye zoj = ";
for( int i=0; i<cZoj; i++ )
cout<<" "<< RtnVal[0][i];
cout<<"\n adade radeye Fard = ";
for( int i=0; i<cFard; i++ )
cout<<" "<< RtnVal[1][i];
getch();
return 0;
}