1. Course
  2. Data types A
  3. Calculate dimensions of sphere

Calculate dimensions of sphere


Last updated: 8/22/2020 Difficulty: Easy

Create a program in C# for calculate the surface and volume of a sphere, given its radius.

  • surface= 4 * pi * radius squared
  • volume= 4 / 3 * pi * radius cubed

Input

60

Output

Surface: 45238,93
Volume: 678584,1

Solution

Data types A

1 / 8

Android App


Practice C# anywhere with the free app for Android devices.

Android App

Exercises C# by difficulty


Learn C# at your own pace, the exercises are ordered by difficulty.

Advertising