4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

Learning To Code #3

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.png

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):
1.png

Another example:
test.png

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

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

10 upvotes 2 downvotes $2.12

Replies (0)

Conversation

No replies yet

Replies will appear here as people join the conversation.

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: