Given the expression by input like 68+32 we have to evaluate without using a semicolon in our program. If it will be something inside the if or for loop?
Reference : https://www.spoj.pl/problems/EXPR2/
Given the expression by input like 68+32 we have to evaluate without using a
Share
You can use if and the comma operator, something like this:
It would be equivalent to
To use variables without any warnings you can define a function the recieves the data types you need that you call from your main, like so:
Note that you need to add
, 0in main, otherwise an error is raised because a void return is not ignored.