Print The * Pattern in C Language
print pattern:
Enter Number : 4
*
* *
* * *
* * * *
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr(); //clear screen.
for(i=1;i<=4;i++)
{
for(j=1;j<=i;j++)
{
printf("*");
}
printf("\n");
}
getch();
}
Enter Number : 4
*
* *
* * *
* * * *
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr(); //clear screen.
for(i=1;i<=4;i++)
{
for(j=1;j<=i;j++)
{
printf("*");
}
printf("\n");
}
getch();
}
Print The * Pattern in C Language
Reviewed by Unknown
on
02:28
Rating:
No comments: