1.
#include<conio.h>
#include<stdio.h>
void main()
{ clrscr();
int i,j;
for(i=0;i<5;i++)
{ for(j=0;j<=i;j++)
{ printf("\t*");
}
printf("\n\n");
}
getch();
}
2.
#include<conio.h>
#include<stdio.h>
void main()
{ clrscr();
int i,j;
for(i=0;i<5;i++)
{ for(j=4;j>=i;j--)
{ printf("\t*");
}
printf("\n\n");
}
getch();
}
3.
#include<conio.h>
#include<stdio.h>
void main()
{ clrscr();
int i,j,k;
for(i=0;i<5;i++)
{ for(k=0;k<4-i;k++)
{ printf("\t-");
}
for(j=0;j<=i;j++)
{ printf("\t*");
}
printf("\n\n");
}
getch();
}
#include<conio.h>
#include<stdio.h>
void main()
{ clrscr();
int i,j;
for(i=0;i<5;i++)
{ for(j=0;j<=i;j++)
{ printf("\t*");
}
printf("\n\n");
}
getch();
}
2.
#include<conio.h>
#include<stdio.h>
void main()
{ clrscr();
int i,j;
for(i=0;i<5;i++)
{ for(j=4;j>=i;j--)
{ printf("\t*");
}
printf("\n\n");
}
getch();
}
3.
#include<conio.h>
#include<stdio.h>
void main()
{ clrscr();
int i,j,k;
for(i=0;i<5;i++)
{ for(k=0;k<4-i;k++)
{ printf("\t-");
}
for(j=0;j<=i;j++)
{ printf("\t*");
}
printf("\n\n");
}
getch();
}
No comments:
Post a Comment