Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Prime numbers- code not working, Help?


  • Please log in to reply
14 replies to this topic

#13 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 11 August 2012 - 12:54 PM

well, do you get any errors, does any strange outputs occur?

a good advice to look for errors in a program is to make debug outputs and see how the program is acting compared to what you wish it to act.
  • 0

I'm a System developer at XLENT Consultant Group mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.


#14 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 11 August 2012 - 05:49 PM

First problem: your code is unreadable.
The combination of poor variable names and no indentation makes it almost impossible to decipher what the code is trying to do.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#15 Luthfi

Luthfi

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1320 posts
  • Programming Language:PHP, Delphi/Object Pascal, Pascal, Transact-SQL
  • Learning:C, Java, PHP

Posted 11 August 2012 - 08:58 PM

After checking www.spoj.pl (i hope it's the correct site), I found that it only supports fpc and gpc. So you must first check if your code runs ok in either freepascal or gnu pascal compiler.

Beside that, it looks like the tester requires some predefined format for interfacing and also uphold speed limit. You must check if your codes match the predefined format in order to comfort the tester.
  • 1




Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download