I made this programme and when I insert more than 10 digits this shows:http://prntscr.com/39l3pw p.s. the programme is supposed to make sum of last m digits of number n please help? also I have an question
Thanks for reply, i have changed array size to m, and i don't thhink that int main() is the problem because I always use main() and it is not a problem, still same problem, help??
If I only use main() - the program doesn't even compile.
Try changing to data type of n if you want it to work for larger numbers. <int> only allows you to go up so far. For example, I made n a long long int.
123456789012345//n
10//m
----
zbir je:31
Edit: Also - broj and br may have to be redefined as well. If m >= 10, the formula doesn't give the correct result.