Pattern Display in C Language

Display This Pattern :
123
1234
12345
123456

Source Code:

#include<stdio.h>
#include<conio.h>
void main()                                
{                                           
    int a,b;                          
    clrscr();                         
    for(a=1; a<=5; ++a)                
    {
        for(b=1; b<=a; ++b)
        {
        printf("%d",b);
        }
    printf("\n");
    }
    getch();
}
Pattern Display in C Language Pattern Display in C Language Reviewed by Unknown on 21:21 Rating: 5

No comments:

Powered by Blogger.