Recap - Till 120
Part of the Fundamentals section of Coddy's Rust journey — lesson 31 of 75.
Challenge
BeginnerWrite a program that gets the user's age as input.
The program will output (print) the number of missing years till 120 (in a specific format, shown below).
For example, for input 25, the expected output is "95 years till 120".
Make sure to not print anything else!
Try it yourself
use std::io;
fn main() {
// Write your code below
}All lessons in Fundamentals
4Operators Part 1
Arithmetic OperatorsModulo OperatorArithmetic ShortcutsComparison OperatorsString Comparison5Operators Part 2
Logical Operators Part 1Logical Operators Part 2Recap - Simple LogicLogical Operators Part 33Variables Part 2
Type DeclarationNaming ConventionsType InferenceRecap - Initialize VariablesType Casting9Loops
For Over SeriesWhile LoopBreakContinueNested LoopLoop LabelsInfinite LoopRecap - Dynamic Input