Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5
scanf("%c", &sign); reads the newline from the previous input. You should change it to: scanf(" %c", &sign); notice the space on the front, it tells scanf to ignore whitespaces.
2nd Apr 2019, 6:05 PM
Dennis
Dennis - avatar