An open API service indexing awesome lists of open source software.

https://github.com/prathamp25/ai-drawing-generator

A C++ program takes user input to draw either a tree or a smiley face using ASCII art. It defines two functions, `drawTree()` and drawSmiley(), which are called based on the input. If the input is invalid, it displays "Unknown drawing!".
https://github.com/prathamp25/ai-drawing-generator

ascii-art controlflow cpp

Last synced: 2 months ago
JSON representation

A C++ program takes user input to draw either a tree or a smiley face using ASCII art. It defines two functions, `drawTree()` and drawSmiley(), which are called based on the input. If the input is invalid, it displays "Unknown drawing!".

Awesome Lists containing this project

README

          

# AI-Drawing-Generator
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++.