OUTPUT:
CONCEPT:
For printing W we can use a very simple trick. simply print V and reverse it (means loop) so W will be formed, please refer to the V c code in my blog for better understanding.
for W c code refer below code u can edit according to your self
C CODE(RUNS ON TURBO C++):
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=1;i<=10;i++)
{
for(j=3;j<=10;j++)
{
if(i==j||j==10)
{
printf("*");
}
else
{
printf(" ");
}
}
printf("\n");
for(j=10;j>=3;j--)
{
if(i==j||j==10)
{
printf("*");
}
else
{
printf(" ");
}
}
}
getch();
}
0 Comments
if you have any doubt, plz let me know