Just change scanf("%c",&one);
to scanf(" %c",&one);
and scanf("%c",&two);
to scanf(" %c",&two);
More Related Contents:
- what the output of this code and why?
- why segmentation error in my program
- Passing values to macros by for loop
- How come an array’s address is equal to its value in C?
- How to escape the % (percent) sign in C’s printf
- MIN and MAX in C
- How to make an OpenGL rendering context with transparent background?
- Macro vs Function in C
- Download file using libcurl in C/C++
- Catch and compute overflow during multiplication of two large integers
- Why doesn’t getchar() recognise return as EOF on the console?
- stdlib and colored output in C
- Signal handling with multiple threads in Linux
- How can a Format-String vulnerability be exploited?
- Why is there no strtoi in stdlib.h?
- Why do we define INT_MIN as -INT_MAX – 1? [duplicate]
- Why do I have to define LD_LIBRARY_PATH with an export every time I run my application?
- scanf() variable length specifier
- Errors using ternary operator in c
- Scanf/Printf double variable C
- How to wrap printf() into a function or macro?
- How to copy directory from source tree to binary tree?
- Executing code before main()
- In C, what’s the size of stdout buffer?
- Why is the compiler throwing this warning: “missing initializer”? Isn’t the structure initialized?
- When is it valid to access a pointer to a “dead” object?
- checking for NULL before calling free
- Can printf get replaced by puts automatically in a C program?
- Is accessing the “value” of a linker script variable undefined behavior in C?
- Difference between scanf() and fgets()