Program to find the surface area of the square pyramid | C # program to find the surface area Of Square pyramid ; function to find the surface area ; Driver Code ; surface area of the square pyramid
using System ; class GFG { static int surfaceArea ( int b , int s ) { return 2 * b * s + ( int ) Math . Pow ( b , 2 ) ; } public static void Main ( ) { int b = 3 , s = 4 ; Console . WriteLine ( surfaceArea ( b , s ) ) ; } }