Recent

Author Topic: Help!  (Read 3756 times)

leinades1

  • Newbie
  • Posts: 2
Help!
« on: November 04, 2017, 05:25:58 pm »
I'm brand new to programming. I got a homework assignment to find the most occuring number(s) from an array of 100 random numbers. I would like to ask for help, how to get started with solving this problem.
Thanks in advance for anyone who can help me out :)


marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12837
  • FPC developer.
Re: Help!
« Reply #2 on: November 04, 2017, 05:39:13 pm »
Welcome. This forum is not a write my homework service. The idea of homework is that you do it yourself and learn from the experience.

You can however show what you have and where you are stuck, and maybe we can give tips and pointers.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1258
Re: Help!
« Reply #3 on: November 04, 2017, 05:43:05 pm »
Here you can learn how to use the Random and Randomize functions:
https://www.freepascal.org/docs-html/rtl/system/random.html

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1258
Re: Help!
« Reply #4 on: November 04, 2017, 05:50:45 pm »
Now that you have the basic information, study and try to solve your problem.
Just in case you have others doubts, show us your code and explain your logic so we can try to help you.
You just can learn if study and try before you ask.

leinades1

  • Newbie
  • Posts: 2
Re: Help!
« Reply #5 on: November 04, 2017, 07:06:59 pm »
Thanks for the articles valdir.marcos, I figured it out. All I needed was a little tidbit about arrays...
Oh, and marcov, I didn't want someone to do it for me. All I wanted was to get a tip how to get started, but I guess it's more rewarding to fiure it out alone :D

Thaddy

  • Hero Member
  • *****
  • Posts: 19123
  • Glad to be alive.
Re: Help!
« Reply #6 on: November 04, 2017, 08:55:18 pm »
Or try RandomRange... :D   (in math unit)
objects are fine constructs. You can even initialize them with constructors.

 

TinyPortal © 2005-2018