- This topic has 1 reply, 2 voices, and was last updated 12 years, 1 month ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
|
Miscellaneous › Others › C-Program for rectangular pyramid..code required
hello,
i’m a begineer in learning c.i have completed “nested loop” and “arrays”. please help me to make the following structure with comments in program.
a b b b
b a b b
b b a b
b b b a
thank you in advance.
Here loop to generate pattern
for(i=0;i<4;i++)
{
for(j=0;j<4;j++)
{
if(i==j)
{
printf(“a”);
}
else
{
printf(“b”);
}
}
printf(“n”);
}