text: Number of cards needed build a House of Cards of a given level N | Function to find number of cards needed ; Driver Code
code: function noOfCards ( n ) { return parseInt ( n * ( 3 * n + 1 ) / 2 ) ; } var n = 3 ; document . write ( noOfCards ( n ) ) ;