Skip to content

A beginner project for exploring the Rust programming language

License

Notifications You must be signed in to change notification settings

JustinRidings/BeginnerRust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Random Person Generator

This Rust application generates a random person with a name and age, then prints out the person's details and a greeting. To start working with Rust, visit rust-lang.org

Features

  • Random Name Generation: Generates a random name with a length between 6 and 10 characters.
  • Random Age Generation: Generates a random age between 1 and 100.
  • Random Person Generation: Generates a random person with a random name and random age.
  • Person Struct: Contains the name and age fields, with methods for creation and greeting.
  • Display Trait: Implements the Display trait for the Person struct for easy printing.

Usage

To run the application, follow these steps:

  1. Clone the Repository:

    git clone <repository-url>
    cd <repository-directory>
  2. Build the Project:

    cargo build
  3. Run the Project:

    cargo run

Example Output

Name: hurtylhdx, Age:59
Hello, my name is hurtylhdx and I am 59 years old.

About

A beginner project for exploring the Rust programming language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages