text: Find the number of cells in the table contains X | C # program to find number of cells in the table contains X ; Function to find number of cells in the table contains X ; Driver code ; Function call
code: using System ; class GFG { static int Cells ( int n , int x ) { int ans = 0 ; for ( int i = 1 ; i <= n ; i ++ ) if ( x % i == 0 && x / i <= n ) ans ++ ; return ans ; } public static void Main ( ) { int n = 6 , x = 12 ; Console . WriteLine ( Cells ( n , x ) ) ; } }