Creating star or diamond pattern using nested for loop


Question1) Use nested for loops to create the following patterns:

24_Star pattern.jpg

For each pattern, save it as a separate .cpp file. You may either show them to me as you complete each pattern or once you have completed all four. You should complete all four patterns.

Question2) Write a program that will ask the user to input an odd number in the range from 1 – 25. The program will then display a diamond containing that many rows of stars. (The figure below would be the output for 9 rows.) Hint: First, figure out the solution for the sample pattern (fixed value of 9 rows). Then, modify your program so that your user can input the number of rows in the diamond

1636_Diamond pattern.jpg

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Creating star or diamond pattern using nested for loop
Reference No:- TGS01018

Expected delivery within 24 Hours