Monday, 5 October 2015

Program to print numbers Patterns.

  
   
#include<stdio.h>
//#include<conio.h>
void main() {
    int i, j, k;
    //clrscr();
    for (i = 1; i <= 5; i++) {
        for (k = 1; k < i; k++) {
            printf(" ");
        }
        for (j = i; j <= 5; j++) {
            printf("%d", j);
        }
        printf("\n");
    }
    //getch();
} 
Note: Remove the comment line when you are use Turbo C IDE for run your program.

No comments:

Post a Comment