LAHTP-Assignment 2
BATCH 6
DATE : 24th Nov, 2021
“ Please try out the following questions, and try to get the desired output using the loops with C. ”
Regards,
Sibidharan Nandhakumar.
____________________Questions____________________
Question 1: Half Pyramid of ( * )
( * )
( * * )
( * * * )
( * * * * )
( * * * * * )
Question 2: Half Pyramid of Numbers
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
Question 3: Half Pyramid of Alphabets
A
B B
C C C
D D D D
E E E E E
Question 4: Inverted half pyramid of ( * )
( * * * * * )
( * * * * )
( * * * )
( * * )
( * )
Question 5: Inverted half pyramid of numbers
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
Question 6: Full Pyramid of ( * )
( * )
( * * )
( * * * )
( * * * * * )
( * * * * * * * *)
Question 7: Full Pyramid of Numbers
1
2 3 2
3 4 5 4 3
4 5 6 7 6 5 4
5 6 7 8 9 8 7 6 5
Question 8: Inverted full pyramid of ( * )
( * * * * * * * * * )
( * * * * * * * )
( * * * * * )
( * * * )
( * )
Question 9: Pascal’s Triangle
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
Question 10: Floyd’s Triangle.
1
2 3
4 5 6
7 8 9 10
____________________ THE END _____________________