0% found this document useful (0 votes)
11 views2 pages

C Program to Print Number Patterns

eriulgjef er hgre ihger reihgferg

Uploaded by

Sahil Makker
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

C Program to Print Number Patterns

eriulgjef er hgre ihger reihgferg

Uploaded by

Sahil Makker
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

NAME-mayank

ROLLNO.1324595

PROGRAM NO.07
6] Write a program to print the each of the following patterns.

1] ALGORITHM-

Step1) start

Step2) take integer n

Step3) loop outer and inner to print numbers

Step4) print the number


Step5) stop

2] flow chart-
START

INPUT number of rows


(n )

Initialize i=1

Apply the conditions

Increment or decrement

end
3) SOURCE CODE- #include<stdio.h> int main()

{ int i,j,row; printf("Enter number of rows:

scanf("%d",&row); for(i=1;i<=row;i++)

for(j=1;j<=row-i;j++) { printf("

");

for(j=1;j<=i;j++) { printf("%d",

j);

} for(j=i-1;j>=1;j--)

{ printf("%d", j);

printf("\n");

return 0;

4) OUTPUT-

You might also like