Sum of all the numbers present at given level in Modified Pascal ’ s triangle | C ++ program to calculate sum of all the numbers present at given level in an Modified Pascals triangle ; Function to calculate sum ; Driver Code
#include <bits/stdc++.h> NEW_LINE using namespace std ; void ans ( int n ) { if ( n == 1 ) cout << "1" ; else cout << "0" ; } int main ( ) { int n = 2 ; ans ( n ) ; return 0 ; }