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

output:
                      1
                     2 2
                    3 3 3
                   4 4 4 4
                  5 5 5 5 5
20 Nov 2014

Post a Comment

Emoticon
:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
Top