0
Does any one have a good project for arrays?
I am trying to learn c++ finally and im not understand how to use arrays. i am looking for a project that will help me learn how to use them. thank you
6 Respostas
+ 1
Imagine that the arrays are a box have many of the elements
you should give it a size ( [size] ) , you can declared the array with types(int,double,char......)
ex:
int array[10]={1,2,3,4,5,6,7,8,9,10};
the first elements is (1) you can get it like this array[0]
if you want to read array you will need a for loop to fill the elements in the array one by one
for(int i=0;i<10;i++)
cin >> array[i];
and you have many kind of arrays like Two-dimensional
array[10][10]
first element you can get it like this a[0][0]
for reading you need two for loop
for(int i=0;i<10;i++){
for(int j=0;j<10;j++){
cin >> a[i][j];
}
}
ps : am sorry if you didn't understand because my english is not good very much
+ 1
your English is good.
thats a good explanation of arrays but im not understanding how to implement them into my code.
this is why im looking for an easy project to help me familiarize myself with them. thanks
+ 1
this is a neat site thank you
+ 1
nice thanks man
0
ah ok :)
i will give you what i have to help you ;)
www.urionlinejudge.com
create account in this site and press in this link :
https://www.urionlinejudge.com.br/judge/en/search?for=problems&q=array&sort=Problems.solved&direction=desc
see problems and solve it in you compiler then look in screen in the left you will (submit) it'll take you to another page (copy your code into the source code and choose your programming language from right-up (c++(g++ 4.8.2)) then press send and wait the judge to tell you if your answer is correct or not )
best gard ♥
0
Your Welcome Bro ♥
if you want any thing else tell me i will help you