All possible values of floor ( N / K ) for all values of K | C # program for the above approach ; Function to print all possible values of Math . floor ( N / K ) ; Loop from 1 to N + 1 ; Driver code
using System ; using System . Collections . Generic ; class GFG { static void allQuotients ( int N ) { SortedSet < int > s = new SortedSet < int > ( ) ; for ( int k = 1 ; k <= N + 1 ; k ++ ) { s . Add ( N / k ) ; } foreach ( int it in s ) { Console . Write ( it + " ▁ " ) ; } } static void Main ( ) { int N = 5 ; allQuotients ( N ) ; } }