I am doing a basic c programming problem online online. Basically what I have to do is take in an input(from the console), say
00000100+10000001
and produce the right output
00000011
I found an algorithm that i could use to convert binary to decimal and decimal to binary. I don't need help on that part. The problem states that you shouldn't use arrays(strings included). What I was thinking was to take user input of one digit at a time and then process each digit. However whenever I use the
scanf("%d",&i)
, input always advances to a new line which i want to avoid in order for the input and output to match up. Does anyone know how how to take in one digit from the user without moving to the next line?