5
Answers

if statement variable

Sarah Nel

Sarah Nel

14y
2.2k
1
[code]
int numberOfDays = 0;
int total = 0;

if (validation.Month == 12 || validation.Month == 01)
                {
                    numberOfDays = 14;
                }
                total += numberOfDays;
[/code]

The total variable is not storing the numberOfDays total, only 14 is for Dec and Jan, it does not increase.

Answers (5)