Thursday, November 10, 2011

Looping/Perulangan (Nested For)

create an output like this..


This is a listing program :


#include<stdio.h>
#include<iostream.h>
#include<conio.h>


main()

{
int a,b;
clrscr();

for(a=1;a<=5;a++)
{
   printf("\n");
   for(b=a;b<=5;b++)
   cout<<a;
   }
getch();
}


Enjoy it...if any one does not understand please ask by leaving a comment ..
and do not forget to follow our blog ... ^ _ ^

No comments:

Post a Comment