Write a program to display the following: 1 12 123 1234 12345

  • Write a program to display the following:
  • 1
  • 12
  • 123
  • 1234
  • 12345

 

#include<stdio.h>

#include<conio.h>

Void main()

{

Int I,j;

Clrscr();

For(i=1;i<=5;i++)

{

For(j=1<=I,j++)

{printf(“%d\t”,j);

}

Printf(“\n”);

}

Getch();

}

Please follow and like us:

Leave a Reply

Your email address will not be published. Required fields are marked *