Home /
Expert Answers /
Computer Science /
c-star-print-is-an-app-that-draws-rectangle-with-any-dimensions-the-user-wants-using-the-asterisk-pa846
(Solved): C++ Star-Print is an app that draws rectangle with any dimensions the user wants using the asterisk( ...
C++
Star-Print is an app that draws rectangle with any dimensions the user wants using the asterisk(star pattern *). Write a function void star(int height, int width) to do Star-Print's job. The function should take the height, and width, and draw a rectangle of the required dimensions using the asterisk (*). In the main, ask the user to input height and width, then call the function to draw it.
#include #include using namespace std; // function to print a hollow rectangle of given height and width void starA(int height,int width){ // outer for loop to move to next rows for(int i=0;i