so i got a character input from the user, converted it into an integer, and have that integer stored in m.
now im trying to convert that integer into binary...heres the code im using to do that:
Code:
while(m>=1)
{
testing[x] = m % 2;
x++;
}
for(i = x; i<=0 ; i--)
printf("%d", testing[i]);
---
as you probably can tell im a beginner so if this code looks primative, well you know why.
the problem is that its not working lol, basically it just stops doing anything after the user enters the character (and it also prints the integer value on screen after that so i know that parts right)
anyway do I have the right idea here, if so why isnt it working? thanks.
EDIT: by the way, i intialized the testing array as an int with size 5. i dunno what size i should set it to..