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

C Programs for Pyramid Patterns

The document provides a series of C programming tasks focused on printing various pyramid patterns using stars and numbers. It includes examples for half pyramids, inverted half pyramids, and both regular and inverted pyramid star patterns. Each task specifies the input number of rows and the expected output format.

Uploaded by

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

C Programs for Pyramid Patterns

The document provides a series of C programming tasks focused on printing various pyramid patterns using stars and numbers. It includes examples for half pyramids, inverted half pyramids, and both regular and inverted pyramid star patterns. Each task specifies the input number of rows and the expected output format.

Uploaded by

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

1. Write a C program to print half pyramid of starts.

Example:
Input the number of rows: 5
*
**
***
****
*****
2. Write a C program to print half pyramid of numbers.
Example:
Input the number of rows: 5
1
12
123
1234
12345
3. Write a C program to print inverted half pyramid of starts.
Example:
Input the number of rows: 5

*****
****
***
**
*
4. Write a C program to print the inverted half pyramid of numbers.
Example:
Input the number of rows: 5

12345
1234
123
12
1
5. Write a C program to print the Pyramid Star Pattern
Example:
Input the number of rows: 4

*
***
*****
*******

6. Write a C program to print the inverted Pyramid Star Pattern


Example:
Input the number of rows: 4

*******
*****
***
*

7. Write a C program to print the Inverted Left Half Pyramid Pattern


Example:
Input the number of rows: 5

*****
****
***
**
*

8. Write a C program to print the Inverted Left Half Pyramid Pattern


Example:
Input the number of rows: 5

12345
1234
123
12
1

You might also like