TODAY 360 TECH
programming simplified !
Thursday, February 12, 2015
C program for number pattern
#include<stdio.h>
#include<conio.h>
main()
{
int i,j,rng;
clrscr();
printf("enter the range");
scanf("%d",&rng);
for(i=1;i<=rng;i++)
{
printf("\n");
for(j=1;j<=i;j++)
printf("%2d",j);
}
getch();
}
output:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment