Start learning free

LESSON 17 OF 349 · CALCULATIONS WITH NUMBERS

Exercise: Area of Rectangle in Swift

Lesson

We created two variables to store the width and the height of a rectangle.

On line 3, use these two variables and an arithmetic operation you just learned to print the area of the rectangle to the console.

STEP 1 OF 1
    Ctrl + Enter to check

    Area Of Rectangle in Swift

    Keep going with SwiftAbout 340 step-by-step lessons, from your first line of code to coding interviews. Free to start.
    Start learning free