Untitled
unknown
plain_text
4 years ago
1.0 kB
4
Indexable
using System; namespace hw2._4 { class Properties { private double surface_Area_calcualtor(double radius,double height) { double surface_Area = 2 * Math.PI * Math.Sqrt(radius) + 2 * Math.PI * radius * height; return surface_Area; } private double volume_calculator(double radius, double height) { double volume = Math.PI * Math.Sqrt(radius) * height; return volume; } public void printVolumeAndSurfaceArea() { Console.WriteLine("Surface Area: ", surface_Area_calcualtor(5,3)); Console.WriteLine("Volume: ", volume_calculator(5,3)); } } class Program { static void Main(string[] args) { Properties cylindre1 = new Properties(); cylindre1.printVolumeAndSurfaceArea(); } } }
Editor is loading...