Q. Program for following series
1
12
123
1234
12345
123456
#BIT_FirstSem_2017_10No_5Marks_Solution
==> Code goes like this :
#include<stdio.h>
int main()
{
int i,j;
for(i=1;i<=6;i++)
{
for(j=1;j<=i;j++)
{
printf("%d ",j);
}
printf("\n");
}
return 0;
}
Output:
If you are using Turbo C++ IDE, then use conio.h in link section after stdio.h
and use getch(); to hold the output screen, just before the end of main function.
If you have any confusion regarding the program, please, comment below.
Happy Coding !
Thank you
Pattern printing in C
9:54 PM
C Programs
,
featured
,
OldQuestionSolution2017C
,
Pattern Printing in C
,
Pattern programs in C
,
Printing series in c
Edit
0 comments:
Post a Comment