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!".
- Host: GitHub
- URL: https://github.com/prathamp25/ai-drawing-generator
- Owner: prathamp25
- Created: 2025-02-17T09:40:06.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-03-24T17:52:51.000Z (7 months ago)
- Last Synced: 2025-03-24T18:46:50.148Z (7 months ago)
- Topics: ascii-art, controlflow, cpp
- Language: C++
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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++.