Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
Help!
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Getting name / line of ca...
by
jamie
[
Today
at 05:24:44 pm]
TStringGrid displaying a ...
by
jamie
[
Today
at 05:18:04 pm]
Qt does not position form...
by
Alexx2000
[
Today
at 03:52:43 pm]
Application.QueueAsyncCal...
by
Thaddy
[
Today
at 03:17:23 pm]
FPC Unleashed (inline var...
by
Fibonacci
[
Today
at 02:03:21 pm]
Windows API Hooking/DLL I...
by
Thaddy
[
Today
at 01:08:56 pm]
How do 'with' statements ...
by
Thaddy
[
Today
at 01:00:07 pm]
TComboBoxEx & TCheckCombo...
by
Paolo
[
Today
at 11:28:00 am]
DataPort or Synpase stat...
by
serbod
[
Today
at 09:30:51 am]
SynEdit auto End of line ...
by
Martin_fr
[
Today
at 09:08:36 am]
Show Case: WritingTool
by
ginoo
[
Today
at 08:47:02 am]
How to view the TODO list...
by
Thaddy
[
Today
at 07:16:27 am]
Scripts to generate ofici...
by
dbannon
[
Today
at 02:25:56 am]
P.I.S.S. a PlugIn-framewo...
by
cdbc
[
Today
at 01:20:44 am]
International Pascal Cong...
by
Mike.Cornflake
[May 09, 2026, 06:45:37 pm]
SpreadSheet Add Chart Lin...
by
eldonfsr
[May 09, 2026, 06:19:33 pm]
How to access inherited m...
by
Thaddy
[May 09, 2026, 04:12:38 pm]
Anubis activated
by
LemonParty
[May 09, 2026, 03:46:01 pm]
RunFormula: math expressi...
by
LeP
[May 09, 2026, 03:39:53 pm]
Setting canvas offset wit...
by
jamie
[May 09, 2026, 03:14:04 pm]
Limiting Search in TSelec...
by
jamie
[May 09, 2026, 03:09:21 pm]
using make with a differe...
by
Thausand
[May 09, 2026, 02:41:39 pm]
FreeBSD 13/14: RTL dirent...
by
Fred vS
[May 09, 2026, 02:33:11 pm]
Problems with form.AutoSc...
by
OH1KH
[May 09, 2026, 12:07:44 pm]
AVRPascal – free code edi...
by
ackarwow
[May 09, 2026, 09:23:14 am]
« previous
next »
Print
Pages: [
1
]
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
Logged
valdir.marcos
Hero Member
Posts: 1258
Re: Help!
«
Reply #1 on:
November 04, 2017, 05:39:04 pm »
Have you already studied arrays?
http://wiki.freepascal.org/Array
https://www.freepascal.org/docs-html/ref/refsu14.html
https://www.tutorialspoint.com/pascal/pascal_arrays.htm
https://en.wikibooks.org/wiki/Pascal_Programming/Arrays
http://www.w3ii.com/pascal/pascal_arrays.html
Logged
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.
Logged
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
Logged
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.
Logged
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
Logged
Thaddy
Hero Member
Posts: 19123
Glad to be alive.
Re: Help!
«
Reply #6 on:
November 04, 2017, 08:55:18 pm »
Or try RandomRange...
(in math unit)
Logged
objects are fine constructs. You can even initialize them with constructors.
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
Help!
TinyPortal
© 2005-2018