Answer :

Two errors here: first, you're trying to declare arrays[63] for storing 64 elements, as you've probably confused the size of array (n) with the maximum possible index value (that's n - 1). So it definitely should be litera[64] and liczba[64]. BTW, you have to change this line too - while (i<=64): otherwise you end up trying to access 65th element.

And second, you're trying to fill char value with %s format specifier for scanf, while you should have used %c here.

Also, can't help wondering why you declare liczba array as one that stores ints, that initialize it with array of chars. All these '1', '2', etc... literals represent NOT the corresponding digits - but the charcodes for them. I doubt that was your intent.


Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable