Posts

Learning To Code #3

avatar of @steify
25
@steify
·
0 views
·
1 min read

Today I decided that sometimes I should post some exercises that helped me a lot while learning basic stuff. Once I wanted to learn more about Arrays so I asked for an exercise from my programmer friend who has helped me a lot.

Array exercise 1:

  1. Make an array where are 10 random numbers.
  2. Ask the user for a number.
  3. Make an array where are all the numbers from the first array that are smaller than the given number.

Output should be (example):

Array exercise 2:

  1. Make an array where are 10 random numbers.
  2. Ask the user for a number.
  3. Make an array where are all the numbers from the first array until the number that the user gave you is smaller than the next number on the array.

Output should be (example):

Another example:

If you got any questions feel free to hit me up!🤓

Tips: To get the size for the second array try to use loop.