Dec-05-2019, 05:38 PM
(This post was last modified: Dec-05-2019, 05:38 PM by Gribouillis.)
rontoto Wrote:Like in normal math..This doesn't make a set of rules. I know that mathematically, the result of
7+7+7
is the same as ((7+7)+7)
but for your program it is very different because if the program outputs the latter, you'll say that there are useless parentheses and you want to output the former. So you need to define precisely in which cases the program should output parentheses and in which cases it should not. That's what I mean by a set of rules. If you cannot describe it with words, you cannot describe it with code.