(a) Write a program that uses for loops to prints the following patterns separately, one below the other. All asterisks (*) should be printed by a single statement of the form cout <<"*";
(b) Combine your programs and print all four patterns side by side by making clever use of nestedfor loops. (Hint: The last two patterns require that each line begin with an appropriate number of blanks)