I found so many different answers but I've tried to solve 8-queens and maybe that is not what you meant ^.^ here is the code.... #include #include main() { int i,j; int a[8][8]={0}; for(i=0;i<8;i++){ for(j=0;j<8;j++){ if((i==0)&&(j==0)||(i==1)&&(j==4)||(i==2)&&(j==7)||(i==3)&&(j==5)||(i==4)&&(j==2)||(i==5)&&(j==6)||(i==6)&&(j==1)||(i==7)&&(j==3)) a[i][j]=1; cout<<a[i][j]<<"\t";} cout<<"\n";} getch();}
any one here.....!!!
ReplyDeleteits really an amazing website (:
ReplyDeletethanks so much..!!
DeleteThank's For Your Teaching Style ........T.waleed
ReplyDeleteit's good idea ................T.waleed
ReplyDeleteit's good idea .........................thank's
ReplyDeleteThanks a lot for all of you........!!
ReplyDeletecan you give me electronic book about '# table ' proplem pleaes?
ReplyDeleteI found so many different answers but I've tried to solve 8-queens and maybe that is not what you meant ^.^
ReplyDeletehere is the code....
#include
#include
main()
{
int i,j;
int a[8][8]={0};
for(i=0;i<8;i++){
for(j=0;j<8;j++){
if((i==0)&&(j==0)||(i==1)&&(j==4)||(i==2)&&(j==7)||(i==3)&&(j==5)||(i==4)&&(j==2)||(i==5)&&(j==6)||(i==6)&&(j==1)||(i==7)&&(j==3))
a[i][j]=1;
cout<<a[i][j]<<"\t";}
cout<<"\n";}
getch();}
فين المشاكل يا استاذي ما لقيت الا متاهات هههههههههههههههه
ReplyDeleteالسلام عليكم انا معجب جدا بوجودي معكم متمنيا ان اكون عند حسن ان شاء الله
ReplyDeleteالسلام عليكم
ReplyDeleteفين المشاكل ياستاذ وليد