Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Q-2 dotnet
using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { static float pi = 3.14159f; // Function to calculate Volume of cone public static float volume(float r, float h) { return (float)1 / 3 * pi * h * r * r; } // Function to calculate Surface area of cone public static float surface_area(float r, float s) { return pi * r * s + pi * r * r; } public static void Main(string[] args) { float radius = 5; float slant_height = 13; float height = 12; // Printing value of volume and surface area Console.Write("Volume Of Cone : "); Console.WriteLine(volume(radius, height)); Console.Write("Surface Area Of Cone : "); Console.WriteLine(surface_area(radius, slant_height)); } } }
run
|
edit
|
history
|
help
0
Cotton Farm 0.0.2.02
pointer
Rotation String
Sample code
Math Operations
IntToExcelColumnNotation
actions and tasks
(Sort)Rounding Magic - C#
C++ lesson
MVC Learning