Why my Program isnt working after providing input?

From the example code you sent, it doesn’t seem that the program have any error with getting the input.

What your program does is get the input, process it, and then end, with return code 0. I believe that the problem in your code is that you are not printing any output, so you don’t actually know that the problem succeeds.
From the message in CLion, it seems that the program is ending as expected, with return code 0.

To fix this issue, make sure to print the result in the end of the function, and see what the result is.
For example, add the following code to the end of the function (between line 31 and line 32):

printf(string2);

Leave a Comment