Q Use for loop to print the following output:
[SIZE=3][COLOR=SandyBrown][FONT=Times New Roman][CENTER]
&
& &
& &
& &
& &
& &
& & & & & & & & & & &
|
Mentor
|
![]() |
| 14Aug2008,20:14 | #2 |
|
How far have you got and where are you stuck?
We won't write the code for you, unless you're willing to pay the going rate. |
|
Skilled contributor
|
|
| 14Aug2008,20:29 | #3 |
|
Codings:
Code:
#include<stdio.h>
#include<conio.h>
void main(void)
{
clrscr();
for (int a=0;a<8;a++)
{
if (a==0)
{
for (int b=0;b<1;b++)
printf("&\n");
}
else if (a>0 && a<7)
{
for (int c=0;c<1;c++)
printf("& &\n");
}
else if (a==7)
{
for(int d=0;d<11;d++)
printf("& ");
}
}
getch();
}
Prof: |

