Pure Programmer
Blue Matrix


Cluster Map

Project: I Love My Town

Write a program that prints the message "I love YourHomeTown!" followed by the message "I hate SomeOtherTown!" Assign town into their own variables. Then use string concatenation to form the two messages and store them in variables as well. Then print out the message variables.

Output
$ rustc ILoveMyTown1.rs warning: static variable `loveTown` should have an upper case name --> ILoveMyTown1.rs:7:8 | 7 | static loveTown:&str = "Saint Louis"; | ^^^^^^^^ help: convert the identifier to upper case: `LOVE_TOWN` | = note: `#[warn(non_upper_case_globals)]` on by default warning: static variable `hateTown` should have an upper case name --> ILoveMyTown1.rs:8:8 | 8 | static hateTown:&str = "East Saint Louis"; | ^^^^^^^^ help: convert the identifier to upper case: `HATE_TOWN` warning: 2 warnings emitted $ ./ILoveMyTown1 I love Saint Louis! I hate East Saint Louis!

Solution