I defined a function by: input : two numbers n,k output: the number k in base n Now I run that function in a loop such that it gives me all the numbers in base n For ex:- if