Star Pattern
Print the following pattern
Pattern for N = 4
The dots represent spaces.
Input Format:
The first line contains a single integer ‘T’ representing the number of test cases.
The first line of each test case will contain an integer ‘N’ that is the total number of rows.
Output Format:
For each test case, print the pattern of N lines.
Output for every test case will be printed in a separate line.
Constraints :
1 <= T <= 100
1 <= N <= 100
CodingNinjas
author
2y
Tip 1 : A simple program of nested for loop. Display the star symbols at locations where row no. is equal to column no.
CodingNinjas
author
2y
Brute Force
The basic idea of this approach is to print the pattern row-wise. The pattern consists of ’N’ rows. Each row contains 2 * ‘N’ - 1 star. In addition to these stars, there are leading spaces....read more
Help your peers!
Add answer anonymously...
Top Wipro Sales Executive interview questions & answers
Popular interview questions of Sales Executive
Top HR questions asked in Wipro Sales Executive
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app