, write a program to draw a ASCII picture of “USM”.
Then rotate the picture for 90 degrees.
#include <iostream>
#include <fstream>
using namespace std;
void initPicture(char table[][60], int rowSize);
void displayPicture(char table[][60], int rowSize);
void drawRect(char table[][60], int rowSize, int upLeftRow, int upLeftCol, int lowRightRow, int lowRightCol);
void rotatePicture(char table[][60], int rowSize);
int main(int argc, const char * argv[])
{
//declare and initiate
char picture[60][60];
initPicture(picture, 60);
//draw U
drawRect(picture, 60, 2, 15, 14, 19)
//add your code...
char U;
cout << "U";
//initiate picture
void initPicture(char table[][60], int rowSize)
{
for (int row = 0; row<rowSize; row++)
{
for (int col = 0; col<60; col++)
table[row][col] = '.';
}
}
//display picture
void displayPicture(char table[][60], int rowSize)
{
for (int row = 0; row<rowSize; row++)
{
for (int col = 0; col<60; col++)
{
cout << table[row][col];
}
cout << endl;
}
}
//draw a rectangle
void drawRect(char table[][60], int rowSize, int upLeftRow, int upLeftCol, int lowRightRow, int lowRightCol)
{
for (int row = upLeftRow; row <= lowRightRow; row++)
{
for (int col = upLeftCol; col <= lowRightCol; col++)
{
table[row][col] = 'o';
}
cout << endl;
}
}
//rotate picture 90 degree to the right
void rotatePicture(char table[][60], int rowSize)
{
for (int row = 0; row < rowSize; row++)
{
for (int rotatePicture);
{
}
}
}
this is the code i have so far and i am getting confused on what else i need to do can yall please help me out.