Crates.io | my-essentials |
lib.rs | my-essentials |
version | 0.1.1 |
source | src |
created_at | 2023-02-17 17:25:08.270358 |
updated_at | 2023-02-17 17:28:49.847327 |
description | A rust library that simplifies things |
homepage | |
repository | |
max_upload_size | |
id | 787676 |
size | 2,077 |
use my_essentials::*;
fn main() {
clear_screen();
println!("Welcome to the survey");
let array = ["1. Bad", "2. Ok", "3. Good", "4. Great", "5. Excelent"];
print_each(&array);
let inp = input("How Would you rate your experience?");
let res = parse_int(&inp);
if res < 1 || res > 5 {
println!("Invalid Answer");
exit();
return;
}
println!("Thank you for the feedback.");
exit();
}