Sunday 1 November 2015

Write a program to print the following pattern using loop in c language.

#include<studio.h> #include<coino.h> Void main() {             Int I,j,n,k;             Printf(“Enter Your no :... thumbnail 1 summary


#include<studio.h>
#include<coino.h>
Void main()
{
            Int I,j,n,k;
            Printf(“Enter Your no : ”);
            Scanf(“%d”,&n);
            For(i=1;i<=n;i++)
            {
                        printf(“  “);
            }
            For(k=1;k<=I;k++)
            {
                        Printf(“%d”,i);
            Printf(“  ”);
            }
            Printf(“\n”);
}
}

Output :- 

                                                          1
                                                2                 2
                                      3                 3                 3

                             4                 4                 4                 4



No comments

Post a Comment