Home » Ask & Discuss » Other Courses » Computer Applications « Back to Discussion



Computer Applications

New kid on the Block

Joined: 27 Oct 2008
Post: 8
28 Oct 2008 09:50:14 IST
0 People liked this
1
401 View Post
Print the pattern: AAAAAAA AMMMMMA AMIIIMA AMITIMA AMIIIMA AMMMMMA AAAAAAA
None

Print the pattern:
AAAAAAA
AMMMMMA
AMIIIMA
AMITIMA
AMIIIMA
AMMMMMA
AAAAAAA


Share this article on:

Comments (1)

Shankhadip Majumder's Avatar

Cool goIITian

Joined: 25 Apr 2008
Posts: 55
29 Oct 2008 08:47:26 IST
1 people liked this

take a 7*7 array




 






 




 


for(i=0;i<7;i++)




 






 




 


{




 






 




 


for(j=0;j<7;j++)




 






 




 


{




 






 




 


if(i%6==0||j%6==0)




 






 




 


{




 






 




 


a[i][j]="A";




 






 




 


}




 






 




 


else




 






 




 


if(i-1%4==0||j-1%4==0&&i%6!=0&&j%6!=0)//i,j shouldnot satisfy above condition




 






 




 


{




 






 




 


a[i][j]="M";




 






 




 


}




 






 




 


else




 






 




 


if(i*j==9)




 






 




 


{




 






 




 


a[i][j]="T";}




 






 




 


else




 






 




 


a[i][j]="I";




 






 




 


}




 






 




 


}




 






 




 


print the array .... ratings please... 




Quick Reply


Reply

Some HTML allowed.
Keep your comments above the belt or risk having them deleted.
Signup for a avatar to have your pictures show up by your comment
If Members see a thread that violates the Posting Rules, bring it to the attention of the Moderator Team
Free Sign Up!

Preparing for IIT-JEE ?

Arihant Revision Package for IIT JEE - Books, Practice Tests + Rank Predictor


@ INR 1,995/-

For Quick Info

Name

Mobile No.

Find Posts by Topics

Physics.

Topics

Mathematics.

Chemistry.

Biology

Parents

Board

Fun Zone

Sponsored Ads