Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

/****************************************************************** * Programmer: [put your name here] * * Date:

I have errors in my program, please help./******************************************************************* Programmer: [put your name here]** Date: [put the current date here]** Course: COMP 220** Assignment: Identification and correction of logical errors** Description: this program prints a triangle with a base of five asterisks * * Output: screen - displays a triangle * ********************************************************************/ #include <iostream>int drawBar(int);int main(){std::cout << std::endl << "Let's Draw a triangle!n";//determine how many lines will be drawnint triangleBase = 0;//draw the triangle for (int i = 0 ; i >= triangleBase ; i--) {drawBar(i);}return 0;} //end mainint drawBar(int barSize) {//draws a line of asterisks//the number of asterisk drawn equals barSizeint theCounter = 0;while (theCounter >= barSize) {theCounter--;std::cout << '*';}std::cout << 'n';return 0;} //end drawBar

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question