I've been working on this for awhile now and I've decided to start over.
I'm trying to make a program where a user can enter 8 binary digits and have it output a number in decimal equal or less than 255. So as to not make the people weary of me here I've been on other forums and haven't had too much luck.
My idea is simple but I don't know how to translate it in c in my head.
First the user enters in a series of binary numbers and the program multiplies 128, 64, 32 by what ever digit corresponds to it. Then the program adds all the numbers up. Sounds simple I know! What I don't know is how to do my inputs.
It's kinda a mess. What I'm trying to do is have i represent each of the 8 bit digits and have a for statement increment i down the row of binary digits. Is their a simple way? I'm asking because I know the more experienced people can cut down on my programming time.
printf("Please enter in a b it binary number.");
for (i=0, i < 8, i++ )
printf("Your value in decimal is "%c".");