Skip to content

Instantly share code, notes, and snippets.

@abdalimran
Created February 12, 2016 18:55
Show Gist options
  • Save abdalimran/0678976f00feca4b6d5a to your computer and use it in GitHub Desktop.
Save abdalimran/0678976f00feca4b6d5a to your computer and use it in GitHub Desktop.
/* Bismillah hir rahmanir raheem. Thanks to Allah for everything.
Coder: Abdullah Al Imran
Email: abdalimran@gmail.com */
#include<bits/stdc++.h>
using namespace std;
void ConvertBase(int N,int base)
{
if(N==0)
return;
int x = N%base;
N/=base;
if (x<0)
N+=1;
ConvertBase(N,base);
cout<<(x<0?x+(base*-1):x);
}
int main()
{
ios_base::sync_with_stdio(false);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment