Find nth number with digits 0,1,2,3,4,5

#include<stdio.h>
int fun(int a[], int n, int base)
{
int i =0,j, r;
if (n==0)
return 0;
while (n > 0)
          {
r = n % base;
a[i++] = r;
n /= base;
}
return i;
}

int main() {
    int n,rem,arr[100],i=0;
    scanf("%d",&n);
   int x = fun(arr, n - 1, 6);
   for (int i = x - 1; i >= 0; i--)
   printf("%d",arr[i]);
    
}

2 comments:

  1. Binance customer support number for Any Issue.

    On the off chance that you have issues to work with the Binance account, at that point call at the Binance Support Number +1856(558) 9404.You will be given the best goals constantly so talk with the help folks and get best assistance without a doubt You will be helped with the valuable arrangements in critical moment so contact with the help group and tackle a wide range of bulky issues in a matter of seconds. You will be furnished with the immense assortment of administrations constantly so talk with the help group and dispose of numerous deterrents in the briefest time pause. Site Visit:- https://www.numbersonweb.com/crypto-exchanges/binance-support-number/

    ReplyDelete
  2. Blockchain and so on wallet issue |Blockchain Support +1{(856)-558-9404}

    Do you face any issue with Blockchain wallet. because of some of the reasons your Blockchain wallet continue changing your, etc solidness, this is as of now to be had on your Blockchain wallet. It's a not surprising inconvenience or it can be faced by means of different clients additionally. They imagined that what is better, etc wallet. that inconvenience can make immense inconvenience among them because of switch of all, etc to Blockchain pockets. in the event that you truly need to utilize this wallet and attempt to search out the issue you truly approach Blockchain Support number +1(856 558-9404) and educate them regarding your Blockchain pockets issue. Our gathering generally prepared to support you. not too bad site go to directly here-https://www.numbersonweb.com/crypto-wallets/blockchain-support-number/

    ReplyDelete