ممكن مساعدة أنا عندى برنامج وحولات ولكن المخرجات تخرج غير المطلوب
Write a C++ program that receives the following information (user name, gender, mobile number and birth date). Then it prints this information. The program must contain 4 functions.
First function: validateName checks if the user name contains only characters.
Second function: validateMobileNo checks if the mobile number was entered correctly.
Third function: validateGender checks if the entered value is male or female.
Fourth function: validateDate checks if the entered value is correct. Year can't be greater than 2010. Month can't be greater than 12. Day can't be greater than 28 in February, 30 in (April, June, September and November) and 31 in (January, March, May, July, August, October and December).
#include<iostream>
#include<conio.h>
#include<iomanip>
int name(char x);
int gender(int a );
int mobile (int r );
int birth (int b );
int main()
{
int a,b,x,r;
cout<<"Enter name :"<<name(x);
cout<<"Enter gender :"<<gender(a);
cout<<"Enter mobile number :"<<mobile®;
cout<<"Enter birth date :"<< birth(b);
getch();}
int name(char x)
{ int i;
char name[10] ;
cin>>x;
for(i=0;i<10;i++)
{ for (char x=65,i=97;x<=90,i<=122;x++,i++)
if(x=65 || x<=90)
cout<<x;
if(x=97 || x<=122)
cout<<x; }
cout<<"The name is correctly found Krkir";
return x;
}
int gender(int a )
{int MALE,FEMALE;
cout<<"Enter 1 injury was MALE, 2 FEMALE harm was"<<"\n";
cin>>a;
if(a==1) a=MALE ;
if(a==2)a= FEMALE;
return a;
}
int mobile (int r )
{int i;
for(int i=1; i<=9;i++)
{cin>>r;
switch (i)
{
case 1 : r=0 ; break;
case 2 : r=5 ; break;
case 3 : r=5 ; break;
case 4 : if(r<=9) ; break;
case 5 : if(r<=9) ; break;
case 6 : if(r<=9) ; break;
case 7 : if(r<=9) ; break;
case 8 : if(r<=9) ; break;
case 9 : if(r<=9) ; break;
case 10 : if(r<=9) ; break;
default : break; }
cout<<r;
}
return r;
}
int birth (int b )
{
}
