C # program to find maximum number of prime factors for a number in range [ 1 , N ]
using System ; class GFG { static int getMax ( int [ ] Arr ) { int max = Arr [ 0 ] ; for ( int i = 1 ; i < Arr . Length ; i ++ ) if ( Arr [ i ] > max ) max = Arr [ i ] ; return max ; }