Sarah Nel

Sarah Nel

  • NA
  • 19
  • 0

if statement variable

Apr 28 2010 5:55 AM
[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)