0% found this document useful (0 votes)
7 views4 pages

PP 2

Uploaded by

ans78hu
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)
7 views4 pages

PP 2

Uploaded by

ans78hu
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
You are on page 1/ 4

Assignments | Pattern Printing - 2 | Week 3

Print the following pattern


Input: n = 5
Output:
1
123
12345
1234567

Print the following pattern

Input: n = 4
Output:
A
ABC
ABCDE
ABCDEFG

Print the following pattern

Input: n = 4
Output:
A
BAB
CBABC
DCBABCD

Print the following pattern


Input: n = 4
Output:

ABCDEFG
ABC EFG
AB FG
A G

Print the following pattern

Input: n = 4
Output:

1234321
123 321
12 21
1 1

Print the following pattern


Input : n = 5
Output:
* *

* *

* *

* *

Print the following pattern


Sample Input : m = 4, n = 6

Sample Output :

* *

* *

* *

* *
* *

Print the following pattern


Sample Input : n = 4
Output :

1
2 2
3 3
4 4

Print the following pattern


Sample Input : n = 5

Output :

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

Print the following pattern


Input : n = 4
Output :

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

Print the following pattern


Input: n = 4
Output:

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

Note:- Please try to invest time doing the assignments which are necessary to build a strong
foundation. Do not directly Copy Paste using Google or ChatGPT. Please use your brain .

You might also like