- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to find Volume and Surface Area of a Sphere using C#?
For volume and surface area of a sphere, firstly declare a variable with the value of radius.
int r = 15;
Get the volume f the sphere.
// calculating volume of sphere cal_volume = (4.0 / 3) * (22 / 7) * r * r * r;
Now the surface area of the sphere is calculated −
cal_area = 4 * (22 / 7) * r * r;
Let us see the complete code −
Example
using System; using System.Collections.Generic; public class Demo { public static void Main(string[] args) { double cal_area, cal_volume, r; // radius r = 15; // calculating area of sphere cal_area = 4 * (22 / 7) * r * r; // calculating volume of sphere cal_volume = (4.0 / 3) * (22 / 7) * r * r * r; Console.WriteLine("Area of Sphere: " + cal_area); Console.WriteLine("Volume of Sphere: " + cal_volume); } }
Output
Area of Sphere: 2700 Volume of Sphere: 13500
- Related Articles
- Find the volume of a sphere whose surface area is ( 154 mathrm{~cm}^{2} ).
- C++ Program to calculate the volume and area of Sphere
- How to find the Surface area and Volume of Cuboid in Golang?
- Golang program to calculate the volume and area of a Sphere
- Swift Program to calculate the volume and area of Sphere
- Python Program to calculate the volume and area of Sphere
- Swift Program to Find the Surface area and Volume of Cuboid
- Java Program to Find the Surface area and Volume of Cuboid
- Kotlin Program to Find the Surface Area and Volume of Cuboid
- How to calculate the volume of a sphere using C programming language?
- The surface area of a sphere is $3844 m^{2}$. Find the radius of the sphere.
- Program for Volume and Surface Area of Cube in C++
- Program for Volume and Surface Area of Cuboid in C++
- Surface Area and Volume of Hexagonal Prism in C programming
- The surface area of a sphere is $5544 cm^2$, find the diameter.

Advertisements