Exercise 1: Fundamentals of Ruby

Here are a couple of exercises for us to practice writing programs in Ruby.

Problem statement #1

Write a program to calculate your average daily salary. The user should be able to type their annual income and the program should then be able to calculate their daily salary. Modify the program, so that it also calculates monthly salary.

Let’s try it for ourselves before looking at the solution.

Get hands-on with 1200+ tech skills courses.