Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 944 Bytes

README.md

File metadata and controls

41 lines (27 loc) · 944 Bytes

Random Text Generator

This program generates random text based on a given input string. It randomly selects characters from a predefined set of characters and tries to match them with the input string. The generated text is printed to the console until it matches the input string.

How to Use

  1. Compile the program using a C compiler such as GCC:
gcc infinite_monkey_theorem.c -o infinite_monkey_theorem
  1. Run the compiled program:
./random_text_generator
  1. Enter the text you want to generate when prompted.

  2. The program will then generate random text until it matches the input text and display the number of attempts taken to generate the input text.

Example

Text to be generated: Hi
21
Ah
Ho
Pe
Hi
Your text was generated in 5 attempts.

Dependencies

  • Standard C libraries

License

This project is licensed under the MIT License - see the LICENSE file for details.