Q.1 Create a new Visual Studio poject and source code file . copy and paste the
ID: 3622814 • Letter: Q
Question
Q.1 Create a new Visual Studio poject and source code file
. copy and paste the code below into the source code file.
. Correct the Logical errors in the code so that the output of the program appears as such:
*
**
***
****
******
#########################################################################
#include
int drawBar(int);
int main()
{
std::cout << std::endl<< " let's Draw a triangle! ";
for 9int i = 0 ; i >= triangleBase ; i--) {
drawBar(i);
}
return 0;
}
int drawBar (int barSize){
int theCounter = 0;
while (theCounter >= barSize) {
theCounter --;
std ::count << '*';
}
std :: cout << ' ';
return 0;
}
Explanation / Answer
Dear user, #include "stdafx.h" #include int drawBar(int); int main() { int triangleBase; std::coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.