Program:
//Required stuff//
#include <iostream>
using namespace std;
//Start program//
int n,b; //FAQ: n is entered number, b is the base of result//
int i, y=0; //FAQ: i, y are integers which helps program to work//
//In case of using letters for base 10 or more//
char x[16], r[200]; //FAQ: x are the numbers, r is the result number//
//Start working//
int main()
{
//Define numbers//
x[0]='0';
x[1]='1';
x[2]='2';
x[3]='3';
x[4]='4';
x[5]='5';
x[6]='6';
x[7]='7';
x[8]='8';
x[9]='9';
x[10]='A';
x[11]='B';
x[12]='C';
x[13]='D';
x[14]='E';
x[15]='F';
//Scan number and base of result//
printf("Enter number: ");
scanf("%d", &n);
printf("\nEnter base of result (16 maximum): ");
scanf("%d", &b);
//Put the number in that base//
do
{
i=n%b;
n=n/b;
y++;
r[y]=x[i];
} while (n!=0);
//Print result//
strrev(r);
printf("\nResult: %s\n", r);
//End program//
system("pause");
return 0;
} //Press any key to continue . . .//
Program prebacuje brojeve iz dekadskog u neki drugi brojevni sustav sa odabranom bazom...
Postoji greška negdje ne mogu je nać jel možete pomoć pls :))