fefa
20-01-2006, 06:01 PM
هذا الواجب السي لمعهد العالميه
# include<iostream.h>
void main(void)
**
int s[5][3]={101,50,25,102,60,30,103,12,550,104,8,250,105,19, 400};
int pace_number;
int countity;
char g ;
cout<<"\n"<<"pace_no\t count \t pace_price \n ";
cout<<"101\t 50 \t 25\n";
cout<<"102\t 60 \t 30\n";
cout<<"103\t 12 \t 550\n";
cout<<"104\t 8 \t 250\n";
cout<<"105\t 19 \t 400\n\n";
do
**
cout<<"Enter pace_no to want buy \n";
cin>>pace_number ;
if(g='n')
switch(pace_number)
**
case 101:
cout<<"Enter a countity :-\n";
cin>>countity;
if ( countity<=50 )
**
cout<<"The count is here.. \n";
cout<<"are you continue . if you want press n , no press h\n";
cin>> g ;
}
else
cout<<"Sorrey.. the count is not here , try a gine\n ";
break;
case 102:
cout<<"Enter a countity :-\n";
cin>>countity;
if ( countity<=60 )
**
cout<<"The count is here.. \n";
cout<<"are you continue . if you want press n , no press h \n";
cin>> g ;
}
else
cout<<"Sorrey.. the count is not here , try a gine\n ";
break;
case 103:
cout<<"Enter a countity :-\n";
cin>>countity;
if ( countity<=12 )
**
cout<<"The count is here.. \n";
cout<<"are you continue . if you want press n , no press h \n";
cin>> g ;
}
else
cout<<"Sorrey.. the count is not here , try a gine\n ";
break;
case 104:
cout<<"Enter a countity :-\n";
cin>>countity;
if ( countity<=8)
**
cout<<"The count is here.. \n";
cout<<"are you continue . if you want press n , no press h \n";
cin>> g ;
}
else
cout<<"Sorrey.. the count is not here , try a gine\n ";
break;
case 105:
cout<<"Enter a countity :-\n";
cin>>countity;
if ( countity<=19 )
**
cout<<"The count is here.. \n";
cout<<"are you continue . if you want press n , no press h \n";
cin>> g ;
}
else
cout<<"Sorrey.. the count is not here , try a gine\n ";
break;
default:
cout<<"The Pace number is rong " ;
break;
}
if(g=='h') break;
}
while(pace_number>=101 && pace_number<=105);
}
ادعولي وادعو للعضو منطلق بطموحي
فيه فقره مطلوبه في الواجب بس ماسويتها حلوها انتو :)
# include<iostream.h>
void main(void)
**
int s[5][3]={101,50,25,102,60,30,103,12,550,104,8,250,105,19, 400};
int pace_number;
int countity;
char g ;
cout<<"\n"<<"pace_no\t count \t pace_price \n ";
cout<<"101\t 50 \t 25\n";
cout<<"102\t 60 \t 30\n";
cout<<"103\t 12 \t 550\n";
cout<<"104\t 8 \t 250\n";
cout<<"105\t 19 \t 400\n\n";
do
**
cout<<"Enter pace_no to want buy \n";
cin>>pace_number ;
if(g='n')
switch(pace_number)
**
case 101:
cout<<"Enter a countity :-\n";
cin>>countity;
if ( countity<=50 )
**
cout<<"The count is here.. \n";
cout<<"are you continue . if you want press n , no press h\n";
cin>> g ;
}
else
cout<<"Sorrey.. the count is not here , try a gine\n ";
break;
case 102:
cout<<"Enter a countity :-\n";
cin>>countity;
if ( countity<=60 )
**
cout<<"The count is here.. \n";
cout<<"are you continue . if you want press n , no press h \n";
cin>> g ;
}
else
cout<<"Sorrey.. the count is not here , try a gine\n ";
break;
case 103:
cout<<"Enter a countity :-\n";
cin>>countity;
if ( countity<=12 )
**
cout<<"The count is here.. \n";
cout<<"are you continue . if you want press n , no press h \n";
cin>> g ;
}
else
cout<<"Sorrey.. the count is not here , try a gine\n ";
break;
case 104:
cout<<"Enter a countity :-\n";
cin>>countity;
if ( countity<=8)
**
cout<<"The count is here.. \n";
cout<<"are you continue . if you want press n , no press h \n";
cin>> g ;
}
else
cout<<"Sorrey.. the count is not here , try a gine\n ";
break;
case 105:
cout<<"Enter a countity :-\n";
cin>>countity;
if ( countity<=19 )
**
cout<<"The count is here.. \n";
cout<<"are you continue . if you want press n , no press h \n";
cin>> g ;
}
else
cout<<"Sorrey.. the count is not here , try a gine\n ";
break;
default:
cout<<"The Pace number is rong " ;
break;
}
if(g=='h') break;
}
while(pace_number>=101 && pace_number<=105);
}
ادعولي وادعو للعضو منطلق بطموحي
فيه فقره مطلوبه في الواجب بس ماسويتها حلوها انتو :)