Table of Contents

## Â **Question:****Â **

#### Write a program that prompts the user to enter a *int* value and display the full pyramid using star (*) like output sample.

**Â Output Sample: Â Â **

2

1 2 3 4 5 6 7 8 9 10 11 |
3 * * * * * * * * * 5 * * * * * * * * * * * * * * * * * * * * * * * * * |

## Â **Source Code:**Â

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
#include<stdio.h> main() { int number, line, i, space, j=0, rows; scanf("%d", &number); for(line=1; line<=number; line++) { scanf("%d", &rows); for(i=1; i<=rows; ++i, j=0) { for(space=1; space<=rows-i; ++space) { printf(" "); } while(j != 2*i-1) { printf("* "); ++j; } printf("\n"); } } return 0; } |

**Â List of C Exercises:Â **

- Sum of two integer numbers
- Arithmatic calculation
- Average calculation
- Square root of a number
- Celsius to Fahrenheit convert
- Centimter to feet convert
- Square, Cube solution
- Reverse your number
- Find out bigger number
- Find Factorial of a Number
- Integer Number count
- !1+!2+!3+!4+!5â€¦..!n Factorial sum
- Positive or Negative number
- Generate Multiplication Table
- Even or Odd number
- Calculate Power of a Number
- Grading Marks using Switch Case
- Basic Calculator using if-else
- Basic Calculator using Switch Case
- Count your day using switch case
- Leap year counting
- Print Half pyramid using star
- Print half pyramid using numbers
- Print Inverted Half pyramid using star
- Print Inverted Half pyramid using numbers
- Print full pyramid using star
- Print Inverted full pyramid using star
- Print Floydâ€™s Triangle pyramid
- Print hollow square star pattern
- Print rhombus star pattern
- Print hollow pyramid using star
- Check Vowel or consonant character
- Uppercase and Lowercase English Alphabets prints
- Check Palindrome number
- Fibonacci Sequence display