Quote Originally Posted by God View Post
im not sure what you mean. it scans and then sums each character before re-checking its condition. if just a period is entered it will scan that period and enter 46 into sum. the if statement uses that and works fine.
Let's say a is 10 and b is 20.

If you enter 'ab.', when the program begins, sum=0. When a is scanned and its value added, sum=10. When b is scanned and its value added, sum=30 (20+10). When the period is scanned and added, sum=30+46=76. It will never be equal to 46 unless you JUST enter a period.