C
C#3y ago
Sam DZ

✅ how to sum the variables which inside the if statements ?

5 Replies
Angius
Angius3y ago
Give them default values 0 for example
Sam DZ
Sam DZOP3y ago
Wow ! I wouldn't expect it will be easy like this ! Lol Thanks @Angius
ChucklesTheBeard
another option would be to declare the total first, then add to it inside the ifs
Sam DZ
Sam DZOP3y ago
@ChucklesTheBeard No not like this i want the code to run

Did you find this page helpful?