اخواني اول لعبه ابرمجها 00
اعرف انها سهله جدا
لكني وقفت عند نقاط 00
هذه محاولتي يوجد اخطاء ارجو ارشادي لها 00
وكيف استطيع ان احسب من الفائز باللعبه في النهايه 00
#include < iostream.h >
void p1 ( void );
void p2 ( void);
char a[3][3];
char x,o;
int i,j;
void main ()
{
for ( int i=0;i<3;i++)
for ( int j=0;j<3;j++)
{
a[j]='1';
}
switch ()
{
case 9:
case 7:
case 5:
case 3:
case 1: p2();
case 8:
case 6:
case 4:
case 2: p1();
}
}
void p1 ( void )
{
char user1;
cout << " welcome to the user number 1 " << endl;
cout << " Enter the number of row";
cin >>a[j];
cout << " Enter the number of colum";
cin>>j;
cout << " [ "<< i<<"]["<<j <<"] = ";
cin >> user1;
if ( user1==x)
{
p2();
}
}
void p2 ( void)
{
char user2;
cout << " welcome to the user number 2 " << endl;
cout << " Enter the number of row";
cin >> i;
cout << " Enter the number of colum";
cin>>j;
cout << " [ "<< i<<"]["<<j <<"] = ";
cin >> user2;
if ( user2==o)
{
p1();
}
}