For Loop Design 3

Monday, 29 August 2011

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
  {
    for(j=1;j<=i;j++)
      {
      printf("%d",j);
      }
      printf("\n");
  }
getch();
}



OUTPUT:


1
12
123
1234
12345






No comments:

Post a Comment

 

Blogger news

Blogroll

Enter your email address:

Delivered by FeedBurner

Total Pageviews

Followers

Most Reading