I can't solve this problem found in a C textbook:
Input data using the following scanf function, so that a=10, b=20, c1='A', c2='a', x=1.5, y=-3.75, z= 67.8. What do you type on the keyboard?
Your input doesn't need spaces, and needs a little adjustment:
Lets go through it:
%5d 00010 %5d 00020 %c A %c a %f 1.5 %f -3.75 // you got all of these %*f -1.5 // Here *f means that the input will be ignored, // but you still need a way to separate the number // before and this one. A + or - will suffice. ,%f ,67.8 // Easy.
Then put it all together, no space: