|
![]() |
#1 | ||
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
|
![]() I got an example task like those that might appear during the exams next week and I have certain trouble...
Quote:
In theory I could try something with extra variables and stuff, but in this task I am limited to pre-defined variables with no space for this... I ran outta ideas so far... got any? |
||
![]() ![]() |
|
![]() |
#2 | ||
![]() ![]() ![]() Join Date: Sep 2004
Location: Dentergem, Belgium
Posts: 1,811
|
![]() I don't know if it's possible in Pascal, but that's usually what Typecasting's for.
|
||
![]() ![]() |
|
![]() |
#3 | ||
![]() ![]() ![]() Join Date: Oct 2003
Location: Telford, England
Posts: 1,303
|
![]() what is that all meant to do? :blink:
__________________
I liked the old forum.. =/ |
||
![]() ![]() |
|
![]() |
#4 | ||
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
|
![]() Quote:
Quote:
|
||
![]() ![]() |
|
![]() |
#5 | ||
![]() ![]() ![]() Join Date: Oct 2003
Location: Telford, England
Posts: 1,303
|
![]() must they all be longints?
since why not just use a and n?
__________________
I liked the old forum.. =/ |
||
![]() ![]() |
|
![]() |
#6 | ||
![]() ![]() ![]() Join Date: Sep 2004
Location: Dentergem, Belgium
Posts: 1,811
|
![]() |
||
![]() ![]() |
|
![]() |
#7 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2005
Location: ,
Posts: 454
|
![]() What can you edit in your code??
If this can be done try this: K:=K DIV 2; DIV is an operator that deals with integer division, so K will stay int.
__________________
Never mess with me when I have a cougar, Never! |
||
![]() ![]() |
|
![]() |
#8 | ||
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
|
![]() Quote:
Quote:
|
||
![]() ![]() |
|
![]() |
#9 | |||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2005
Location: ,
Posts: 454
|
![]() Quote:
EDIT: I just remembered that you could use round(x:real):integer for rounding that numbers correctly.
__________________
Never mess with me when I have a cougar, Never! |
|||
![]() ![]() |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Log-in trouble | MM_not_logged_in_sorta | Old Suggestions | 3 | 30-06-2009 10:37 AM |
Trouble i need help please | IshaMushaHaya | General compatibility fixes | 3 | 02-07-2008 11:16 AM |
Trouble | dynamite1 | Troubleshooting | 8 | 11-04-2006 07:39 AM |
Need To Learn Turbo Pascal 7... Fast! | The Fifth Horseman | Programming | 17 | 11-03-2005 02:02 PM |
Trouble With Wc | Darren Lauck | Troubleshooting | 3 | 03-03-2005 02:41 PM |
Thread Tools | |
Display Modes | |
|
|
||
  |