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
Interesting video
by
backprop
[
Today
at 07:42:40 am]
If FileExists(
by
Xenno
[
Today
at 07:16:00 am]
TDWEdit
by
Ed78z
[
Today
at 06:38:28 am]
Lazarus Bugfix Release 4....
by
jamie
[
Today
at 03:51:07 am]
Death of the Power User
by
wp
[
Today
at 01:29:18 am]
IndySecOpenSSL is now ava...
by
TheMouseAUS
[
Today
at 01:02:40 am]
Implementing an Elo ratin...
by
n7800
[
Today
at 12:44:10 am]
how to add a ForEach call...
by
mas steindorff
[June 11, 2026, 11:42:24 pm]
How to define a type of ...
by
PascalDragon
[June 11, 2026, 09:24:45 pm]
Gitlab site history date.
by
Martin_fr
[June 11, 2026, 08:46:17 pm]
Arkanoid
by
lazarusprogrammer
[June 11, 2026, 08:14:21 pm]
[New Component] ExtTabCtr...
by
d7_2_laz
[June 11, 2026, 05:01:49 pm]
Conscious Artificial Inte...
by
schuler
[June 11, 2026, 04:39:11 pm]
Pdf Viewer in Pascal
by
Tomxe
[June 11, 2026, 03:52:37 pm]
Eye Candy TESCheme
by
Dzandaa
[June 11, 2026, 11:51:52 am]
P.I.S.S. a PlugIn-framewo...
by
cdbc
[June 11, 2026, 11:35:42 am]
I found an actual use for...
by
marcov
[June 11, 2026, 11:35:23 am]
Who can explain this ?
by
J-G
[June 11, 2026, 11:30:42 am]
XLibre, finally and fortu...
by
Fred vS
[June 11, 2026, 06:20:26 am]
WEBP, no DLLs
by
Tomxe
[June 11, 2026, 04:04:37 am]
Discipline your AI coding...
by
440bx
[June 11, 2026, 02:44:06 am]
Version 4.8 was recently ...
by
Ten_Mile_Hike
[June 11, 2026, 01:43:17 am]
FPC Unleashed (inline var...
by
Fibonacci
[June 11, 2026, 12:03:13 am]
Trayslate 1.3.1 - Free tr...
by
AlexanderT
[June 10, 2026, 08:12:24 pm]
TShellListView
by
Ed78z
[June 10, 2026, 07:59:41 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Help! (Read 3760 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: 1285
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: 12901
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: 1285
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: 1285
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: 19268
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