Задача Increment Variable
Наглед проста програмка ми създава проблеми в джъджа 60 / 100 точки не ми е много ясно защо за това моля за съдействие :)
Ето условието:
Increment Variable
Write a program to increment a byte variable (starting at 0) n times and print the result. If you detect an overflow (or several), print how many times there was an overflow alongside the variable value. Sounds simple, right?
Examples
| Input | Output | 
| 50 | 50 | 
| 1000 | 232 Overflowed 3 times | 
| 256 | 0 Overflowed 1 times | 
А ето и моето грешно решение :