Sunday 1 November 2015

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

Write a program to print the following pattern using loop in c language. #include<stdio.h> #include<conio.h> Void mai... thumbnail 1 summary

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

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

Output : -

1
1    2
1    2    3
1    2    3    4
1    2    3    4    5



No comments

Post a Comment