Question: P3.1.8 Write a script to display the following figure in the command window using fprintf statements: * * * * * * * * *
P3.1.8 Write a script to display the following figure in the command window using fprintf
statements:
*
* *
* *
* *
* *
* . *
* *
* *
*
(its supposed to be a diamond with " * "
Your script should prompt the user to input an integer n for the number of asterisks on each side of
the diamond. In the above example, n = 5. You may assume that n > 3.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
