Same answer keeps reappearing...
https://code.sololearn.com/c4DUfYeyDu2a/?ref=app ... Ok so I am making the Magic Square code for the recent challenge. How it works is you enter the 9 digits of the square top left to right, then middle, then bottom row and 2 things went wrong. 1st, the if and else statements both happened for incorrect or correct entered 9 numbers as you see in the code. I fixed that by adding a return 0; in the if statement so that it would reset and I was wondering if that was the correct way to fix it? 2nd, if you type: 8 1 6 3 5 7 4 9 2 (8 1 6 3 5 7 4 9 2 in code) its a valid Magic Square and the answer is 15. However when you type something incorrect, it always shows 15 anyway. So what I'm trying to do is have it evaluate the 9 numbers you type, and if the answer is a whole number (since the answer has to be a non-decimal), it will say the said answer. But I dont know what to do for the argument of the if statement so to works, and why the codes answer always evaluates to 15.