Generates ASCII art based on user input.
This C++ program is an interactive ASCII art generator that prompts the user to enter either "tree" or "smiley" and then prints a corresponding visual representation. It defines two functions, drawTree()
and drawSmiley()
, which print an ASCII representation of a tree and a smiley face, respectively. In the main()
function, the program takes user input and calls the appropriate function based on the input. If the user enters "tree"
, it displays a small tree, while entering "smiley" prints a smiling face. If the input does not match either of these options, the program outputs "Unknown drawing!". This simple yet engaging program demonstrates basic user input handling, conditional statements, and function usage in C++.