i m a new user of c++. m making a simple program but i dont know which data type should i use. i want to limit the users input to 13 digits
#include<iostream.h>
#include<conio.h>
void main()
{
int a;
clrscr();
cout<<"Enter the cnic number:";
cin>>a;
if(a<=1000000000000 && a<10000000000000)
if(a%2==0)
cout<<"Female";
else
cout<<"Male";
else
cout<<"Invalid";
getch();
}
hope you get my point. any help????? do tell my mistakes . thanks
#include<iostream.h>
#include<conio.h>
void main()
{
int a;
clrscr();
cout<<"Enter the cnic number:";
cin>>a;
if(a<=1000000000000 && a<10000000000000)
if(a%2==0)
cout<<"Female";
else
cout<<"Male";
else
cout<<"Invalid";
getch();
}
hope you get my point. any help????? do tell my mistakes . thanks