Program to find the surface area of the square pyramid | CPP program to find the surface area Of Square pyramid ; function to find the surface area ; Driver program ; surface area of the square pyramid
#include <bits/stdc++.h> NEW_LINE using namespace std ; int surfaceArea ( int b , int s ) { return 2 * b * s + pow ( b , 2 ) ; } int main ( ) { int b = 3 , s = 4 ; cout << surfaceArea ( b , s ) << endl ; return 0 ; }