Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
dear sir,
can i print pattern like-

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14
1 2 3 4 5 6 7 8 9 10 11 12 13
1 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 10 11
1 2 3 4 5 6 7 8 9 10 11

using for loop...
plz help...
Posted
Updated 4-Mar-14 20:05pm
v2
Comments
StM0n 5-Mar-14 0:30am    
first: yes you can...
second: What have you tried so far? We're not quite fond of doing your homework.
Rajkumar_007 5-Mar-14 0:35am    
i want to replace numbers with image button.

int max=16;
for(int i=1;i<5;i++)
{
for(int j=1;j<max;j++)>
{
//if you want just to print on screen you can take textarea or label then insert value of j
//like console.write(j);
//or if you want to generate image of this pattern you can go throgh bitmap class just bind //your data or append it to bitmap array
}
max--;
//console.write("\n");
//append this \n in bitmap class append
}
 
Share this answer
 
 
Share this answer
 
Comments
Rajkumar_007 5-Mar-14 4:34am    
Thank you sir.... :)
King Fisher 5-Mar-14 5:30am    
welcome :)
C#
int num=16;
for(int i=0;i<6;i++)
{ 
for(int x=1;x<num;x++)>
{
 console.writeLine(x);
 console.writeLine(" ");
}
console.writeLine("\n");
if(i<4)
{
  num--;
}
}
 
Share this answer
 
v4
Comments
Rajkumar_007 5-Mar-14 2:40am    
but i want to print only 76 numbers...
ErBhati 5-Mar-14 5:20am    
pls see updated answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900