Do not answer Question NumberOne ? Please answer the questions inDetails in Deta
ID: 3617307 • Letter: D
Question
Do not answer Question NumberOne? Please answer the questions inDetails in Details (explaine) 1- Write a function that displays at the left margin of thescreen a solid square of asterisks whose side is specified ininteger parameter side. For example, if side is 4, the functiondisplays the following: **** ********
****
Question:2- Modify the function createdin the first question to form the square out of whatever characteris contained in character parameter fillcharacter. Thus, if side is5 and fillcharacter is #, then this function should print thefollowing: ##### #####
#####
#####
##### Question:3- Use techniquessimilar to those developed in Question number One and questionnumber two to produce a program that graphs a wide range ofshapes. Do not answer Question NumberOne? Please answer the questions inDetails in Details (explaine) Please answer the questions inDetails in Details (explaine) 1- Write a function that displays at the left margin of thescreen a solid square of asterisks whose side is specified ininteger parameter side. For example, if side is 4, the functiondisplays the following: **** ****
****
****
Question:2- Modify the function createdin the first question to form the square out of whatever characteris contained in character parameter fillcharacter. Thus, if side is5 and fillcharacter is #, then this function should print thefollowing: ##### #####
#####
#####
##### Question:3- Use techniquessimilar to those developed in Question number One and questionnumber two to produce a program that graphs a wide range ofshapes.
Explanation / Answer
#include<iostream> using namespace std; void paint(int,char); int main() { int num; char c;
cout<<"Enter Margin: "; cin>>num; cout<<" Enter the character which you want to show:"; cin>>c; paint(num,c); cout<<" Good Bye..."); system("pause"); return 0; }
void paint(int n,char c) { int v,i; for(v=1;v<=n;v++) { for(i=0;i<=n;i++) cout<<c; cout<<" "; } }
#include<iostream> using namespace std; void paint(int,char); int main() { int num; char c;
cout<<"Enter Margin: "; cin>>num; cout<<" Enter the character which you want to show:"; cin>>c; paint(num,c); cout<<" Good Bye..."); system("pause"); return 0; }
void paint(int n,char c) { int v,i; for(v=1;v<=n;v++) { for(i=0;i<=n;i++) cout<<c; cout<<" "; } }
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.