/Nim-exercises

Exercises of Nim basics

Primary LanguageNim

Nim-exercises

Exercises of Nim basics.

Part 1

Create an immutable variable containing your age (in years). Print your age in days. (1 year = 365 days)

Check if your age is divisible by 3. (Hint: use mod)

Create an immutable variable containing your height in centimeters. Print your height in inches. (1 in = 2.54 cm)

A pipe has a 3/8 inch diameter. Express the diameter in centimeters.

Create an immutable variable containing your first name, and another one containing your last name. Make a variable fullName by concatenating the previous two variables. Don’t forget to put a whitespace in-between. Print your full name.

Alice earns $400 every 15 days. Bob earns $3.14 per hour and works 8 hours a day, 7 days a week. After 30 days, has Alice earned more than Bob? (Hint: use relational operators)