Guys Iam an amatuer in C++ language. I need help with this program. Please if anybody can help me with it. Please write a code for me. Its a simple program but I dont know how to do it. Please its really important for me to do this stuff! THanks alot!
I have the output to how this program looks and Iam supposed to write a code for this. Please help me out buddies!
Here is the link to this Program output please download it and change the extension to .EXE . THankx alot guys! Waiting for early reply!
LINK~~~~ http://www.megaupload.com/?d=6QQALGT9
Guys I also have the algorithm see if this helps! THanx alot!
Input & Output~~~
The user will enter
1 for a triangle
2 for a rectangle
or 0 to quit
Any other number is unacceptable.
Use a loop to force the user to enter a valid value
Use a menu format for a prompt
If the user enters 1 or 2, she should be prompted to read a single character that will be used to create the figure.
any keyboard character may be specified
For a triangle, the user will enter the height of the triangle.
The output is a triangle created with height representing the number of lines on the screen. For example, a height of three would look like:
*
**
***
For rectangles, the user will enter the height and width of the rectangle.
The output is a rectangle created with height representing the number of lines on the screen and the width is the number of characters on each line. For example, a height of three and a width of four would look like:
****
****
****
Main should print the total number of characters used or an error message.
Algorithm~~~~
Create a main program loop controlled by the users response in the next step
Use a menu to ask the user to select 0, 1 or 2 (quit, triangle, rectangle)
Use a call-by-reference utility function to force the user to enter a number between 0 and 2.
If the user said to quit, leave the main loop.
Otherwise
use a call-by-reference function to ask the user to enter a character to be used when displaying the figure.
Use a call-by-reference function to ask the user to enter a height and (for rectangles only) a width.
Call a function that creates the image and returns
the number of characters used to create the image
or, 0 if the image was not created
An error has occured (return 0) if
the height is less than 1 or larger than 20
the width is less than 1 or larger than 40
This function must call another function to create one line of the image
main should check the value returned
Print the number of characters used
say something if an error occurred (zero return value)
Please if someone can write the full code help me out! I need serious help here!