Knaph

Pointers, Methods, and Interfaces43 of 62

Perimeter

Define a Perimeter() int method on Rectangle that returns 2 * (Width + Height). main already reads the width and height and prints the result.

Sign in to try this exercise.