my-essentials

Crates.iomy-essentials
lib.rsmy-essentials
version0.1.1
sourcesrc
created_at2023-02-17 17:25:08.270358
updated_at2023-02-17 17:28:49.847327
descriptionA rust library that simplifies things
homepage
repository
max_upload_size
id787676
size2,077
(Apearson75)

documentation

README

My Essentials for Rust

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();
}
Commit count: 0

cargo fmt