Q1.
Printing * horizontally
Sample Input: Sample Output:
N=4 ****
Q2. Printing numbers from 1 to N
Sample Input: Sample Output:
N=4 1234
Q3. Printing numbers from 1 to N with comma
Sample Input: Sample Output:
N=4 1,2,3,4
Q4. Printing * with #
Sample Input: Sample Output:
N=8 ***#***#**
M=3
Q5. Printing * in 2 – D
Sample Input: Sample Output:
**
N=4 **
M=2 **
**
Q6. Printing N lines of stars in Square fashion
Sample Input: Sample Output:
****
****
N=4 ****
****
Q7. Printing stars in right angle triangle
Sample Input: Sample Output:
*
**
N=4 ***
****
Q8. Printing numbers in right angle triangle
Sample Input: Sample Output:
1
N=4 12
123
1234
Q9. Printing increment numbers in right angle triangle
Sample Input: Sample Output:
1
23
N=4
456
7 8 9 10
Q10. Printing * and # in right angle triangle
Sample Input: Sample Output:
#
N=4 #*
#*#
#*#*
Q11. Printing numbers in inverted right angle triangle
Sample Input: Sample Output:
N=4 1234
123
12
1
Q12. Printing stars in pyramid
Sample Input: Sample Output:
*
**
N=4 ***
****
Q13. Printing stars in inverse pyramid
Sample Input: Sample Output:
****
N=4 ***
**
*
Q14. Printing stars in diamond fashion
Sample Input: Sample Output:
*
**
N=4 ***
****
****
***
**
*
Q15. Printing stars in mirrored right triangle
Sample Input: Sample Output:
N=4 *
**
***
****
Q16. Printing stars in Inverse Half Diamond Pattern
Sample Input: Sample Output:
N=4 *******
*****
***
*
Q17. Printing stars in Diamond pattern
Sample Input: Sample Output:
N=4 *
***
*****
*******
*****
***
*
Q18. Diamond pattern – Nos. and Stars
Sample Input: Sample Output:
N=4
1
2*2
3*3*3
4*4*4*4
3*3*3
2*2
1
Q19. Triangle pattern – Nos. and Stars
Sample Input: Sample Output:
N=4 1
2*2
3*3*3
4*4*4*4
4*4*4*4
3*3*3
2*2
1
Q20. Printing custom number pattern
Sample Input: Sample Output:
N=4 1112
3222
3334
5444
THANK YOU