Knaph

First Contact8 of 62

Circle Area

Read a floating-point radius from standard input. Declare const Pi = 3.14159 and use it to compute the circle's area (Pi * radius * radius). Print the area formatted to exactly 2 decimal places — fmt.Printf("%.2f\n", area) does this for you.

Sign in to try this exercise.