My guess:
...
...
readln(n);
while (n <= 32000) do begin
... // do the calculation
... // show the result
readln(n);
end;
...
...
Note: the code above is not actual code.
I know this might seem strange.. but what does
do that stops the loop?
I've asked my best friend (who also goes to programming with me) and he didn't know aswell. Care explaining?
???
so they teach you loops before decision making (comparison) ;; are you sure you didn't skip classes
any way rvk, gave the most valid code -in my opinion-; so you should at least study it, and comprehend how it works
We didn't use inc, but I know what it does. We learned if, and we've had enough assignments with "if" "case of" that we've done already.. etc etc, cause I mean I would've come to this forum even earlier if I didn't know how to use them.
So, in the end i wanted to ask you if you could explain what happens exactly in routine2, because if you can tell me that then you figured out how to solve the repeating div problem from your original question ;-) (well, at least you should be able todo so then).
Sure, no problem
! But, sadly neither today nor the next days.. I've got some other things to do (school and extra work for other objects), but I will surely message you with my answer/questions regarding your code on Friday/Thursday! Thanks again for your amazing response!
FOR EVERYBODY READING MY REPLIES:
I'VE JUST STARTED PROGRAMMING - which means I'm still new to it.
I've skipped two lessons(classes, anything you may call it) for personal reasons, but I've recovered everything they've studied. I know this might seem strange, but I'm completely new to programming, I've only been to about 3-4 lessons/classes in TOTAL, which means I still have yet to learn and there are a lot of holes in my understanding.
I still have lots of questions left unanswered and thus I came here. I know, I have to learn everything by myself.. but sometimes my logic doesn't shine...at all.. it may be just me who blocks myself from trying to understand something thinking it's too hard and I do not need it. Sometimes i'm a fast learner, sometimes I can't understand something that seems so simple, just because I'm giving up fast and just making myself think I'm not going to understand this.
I'm not trying to say that all your answers are worthless, they are wonderful and I really appreciate all your hard work you've put into answering (possibly) a simple question (for you) FOR my understanding. But I'm still a beginner in programming and sometimes all those pieces of code just confuse me.
Still, a big thanks to everyone who contributed to the answers. I WILL take a look at all of them (and possibly even more) on Thursday/Friday and leave a reply then.
Thanks again, and have a nice day!