......
Last edited on
Hi,
Please don't double post - it's ultimately a time waster for those who reply. We could have the same answers being supplied in both topics.
Are all your switch statements are the same?
The best solution would be to have an array of the zip codes, and use a for loop with the switch inside.
You could have a function which takes a zip code (a member of an array) as an argument, then has the switch inside the function.
If you aren't allowed to use either arrays or functions, I would be mystified as to why such restrictions are there.
Btw this : FinalResult = FinalResult + result;
can be written more concisely like this : FinalResult += result;