Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int read_boolean(const char* prompt)
- {
- my_string line;
- int result;
- line = read_string(prompt);
- while not (line == "yes" || line == "no" )
- {
- printf("PLease enter either yes or no")
- line = read_string(prompt);
- }
- if (line = "yes")
- {
- result = true;
- }
- else
- {
- result = false;
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement