Swift - Write program to Declare three constants
HOME
Swift
Introduction
Variables
Requirements
Write program to Declare three constants
to store the number of months in a year,
the number of days in a week, and
the number of weeks in a year.
Hint
Using let
Demo
let
months = 12
let
daysInWeek = 7
let
weeks = 52
Related Exercise
Variables
Variable explicitly typed
Declare a Variable
Previous
Next