display Pattern The Giuven
Pattern:
1
12
123
1234
12345
Source Code:
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c=1;
clrscr();
for(a=1;a<=4;a++)
{
for(b=1;b<=a;b++)
{
printf(" %d ",c);
c++;
}
printf("\n");
}
getch();
}
1
12
123
1234
12345
Source Code:
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c=1;
clrscr();
for(a=1;a<=4;a++)
{
for(b=1;b<=a;b++)
{
printf(" %d ",c);
c++;
}
printf("\n");
}
getch();
}
display Pattern The Giuven
Reviewed by Unknown
on
21:23
Rating:
No comments: