F
F
FreezkoSS2019-04-14 18:39:38
C++ / C#
FreezkoSS, 2019-04-14 18:39:38

The array works crookedly, what's the problem?

I need to fill and display an array, but not all elements are filled and it also doesn’t display everything, which I did wrong, here is the code and the output in the console:
5cb35429e7354039662985.jpeg5cb354311266c599801112.jpeg5cb35437b44a1717783653.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2019-04-14
@Rsa97

You are trying to define A[n] even though n is not yet initialized and can have any arbitrary value.
Well, in C/C++ array indexes start from zero, not from one.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question