Question
/* ----------------------------------------------------------- Question Type : Write a function ----------------------------------------------------------- Write the missing code to make the program runs correctly. The program prompts the user to
/*
-----------------------------------------------------------
Question Type : Write a function
-----------------------------------------------------------
Write the missing code to make the program runs correctly.
The program prompts the user to input a non-zero positive
integer, then prints out the patterns exactly as shown in
the sample runs below.
You must use the repetition structure such as for-loop or
while-loop.
===================================
Sample Run:
Key in a positive integer value: 4
o
o*
o**
o***
o****
===================================
Sample Run:
Key in a positive integer value: 7
o
o*
o**
o***
o****
o*****
o******
o*******
===================================
---------------------------------------------------------------*/
#include
#include
using namespace std;
//-------------------------------------------------
// Write the function drawPattern below.
//-------------------------------------------------
// Begin your answer here:
// Your answer ends here.
// WARNING:
// Do not modify anything below this line.
// Any changes to the lines below will cause
// you to loose the mark for the question.
int main()
{
int m;
cout << "Key in a positive integer value: ";
cin >> m;
draw(m);
return 0;
}
Write a program in C++
Please solve this question
Thankyou In advance
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started