How to calculate surface area of cone in C#

1 Answer

0 votes
using System;

class Program
{
    static void Main() {
        float r = 5;
        float h = 13;

        double SurfaceArea = Math.PI * r * (r + Math.Sqrt((h * h) + (r * r)));
        
        Console.WriteLine("Surface Area of Cone = " + SurfaceArea);
    }
}



   
/*
run:
   
Surface Area of Cone = 297.326427779484
   
*/

 



answered Sep 10, 2021 by avibootz

Related questions

1 answer 143 views
1 answer 182 views
1 answer 136 views
1 answer 146 views
1 answer 137 views
137 views asked Sep 11, 2021 by avibootz
1 answer 194 views
1 answer 125 views
...