[Solved] Writing switch statements using integers [closed]
[ad_1] You cannot do what you want with a switch, but you can simplify it to: if (intDaysOverdue <= 30) decInterestRate = 0m; else if (intDaysOverdue <= 59) decInterestRate = .5m; else if (intDaysOverdue <= 89) decInterestRate = .10m; else decInterestRate = .15m; Your >= 30 and >= 60 conditions are not needed, as they … Read more