Student Struct
Define a struct called Student with two fields: name (String) and grade (String). Create a student named "Emma" who got a grade of "A+", then print their result.
Expected output:
text
Emma got A+
Hints:
- Define the struct with
name: Stringandgrade: String - Use
String::from(...)when setting field values - Print with
println!("{} got {}", student.name, student.grade)
rust
fn main() {
}