Witam, nie moge dojść co tutaj jest źle? ktoś pomoże ?
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a=0;
printf("Podaj liczbe ktora ma byc przeliczona na system szesnastkowy nie wieksza niz 65535: \n");
scanf("%d",&a);
char reszta,litery[7]="ABCDEFG";
int c=0;
char b[100];
do
{
reszta=a%16;
if(reszta<10)
{
b[c]=reszta;
}
if(reszta>9)
{
int d=reszta-10;
b[c]=litery[d];
}
a=a/16;
c++;
}while (a!=0);
for(int i=c-1;i>=0;i--)
{
printf("%s", b[i]);
}
return 0;
}