mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mikysett
020b1b50a9
|
2 years ago | |
---|---|---|
.. | ||
README.md | 2 years ago |
README.md
looping
Instructions
Write a program that prints a riddle, receives input from the user and checks that the answer is correct.
The program must allow an indefinite number of trials and only quit after the correct answer is given.
Every time the user introduces an incorrect answer the program must print the riddle again and after the user gives the correct answer the program must print the number of tries that took to get the correct answer.
Riddle: I am the beginning of the end, and the end of time and space. I am essential to creation, and I surround every place. What am I?
Answer: The letter e
Notions
Usage
$ cargo run
I am the beginning of the end, and the end of time and space. I am essential to creation, and I surround every place. What am I?
I don't know
I am the beginning of the end, and the end of time and space. I am essential to creation, and I surround every place. What am I?
The letter e
Number of trials: 2
$