0
How identify operator in C???
Input = two integers 34 +/-/*/÷ 24 =??? How can you identify the operator and will get output = 34 + 24 = .... (if the operator you input is +) If you input = 34 - 24 Output= 34 - 24 =... ( if the operator you input -)
1 Odpowiedź
+ 1
A possible solution, is to use strpbrk(), strstr(), etc.. (in string.h library)
Or you can write your own code for doing such task.
Here:
https://code.sololearn.com/cXdKsbR95Fju/#c
is an example with strpbrk()
Hope that helps... :)