Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Computer Contest
Index -> Contests
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
octopi




PostPosted: Wed Apr 23, 2003 8:07 pm   Post subject: Computer Contest

So. Yeah, well I am starting a computer contest...

But since I am a cheap bast*rd theres no prizes. (I will donate every bit I have to the winner though. (Theres going to be a few tasks, I will add them when I think of them.))

Also, turing won't work with the way I am going to mark them (automated)
(That is if someone acctually submits any.)

here are the requirements

Must using a programming language that supports STDOUT (c++, perl, etc..)
You only need to include the executable version only.


Task A:
Write a program to find the prime numbers less then N.
A number is prime if it's only factors are 1, and the number.
Your program should run as "filename.exe N"
(anyone still following along?)

example:
filename.exe 18
code:
2 3 5 7 11 13 17
-Edited after darkness's comment

Your program must work for every test set. (1 point per test set)
Person with the most points at the end wins.

Tasks b...c...d.........
comming eventually.
Sponsor
Sponsor
Sponsor
sponsor
Catalyst




PostPosted: Wed Apr 23, 2003 8:40 pm   Post subject: (No subject)

what is stdout?
octopi




PostPosted: Wed Apr 23, 2003 9:35 pm   Post subject: (No subject)

STandarD OUT

if you know c++
then it's
cout



This little code example will show you how to output, and input the number.
(You need to compile it, and open a cmd window, and run it as
"filename.exe N" )
code:
#include <iostream.h>

int main(int argc, char* argv[])
{
        cout << "This text will be outputed on STDOUT" << endl;
        if(argv[1] != 0){
           cout << "The N is : " << argv[1] << endl;
        }
        return 0;
}
Catalyst




PostPosted: Wed Apr 23, 2003 9:37 pm   Post subject: (No subject)

ah i did know cout
jamez




PostPosted: Wed Apr 23, 2003 9:43 pm   Post subject: (No subject)

So we cant use Turing and simply ask the user (you) for N?
octopi




PostPosted: Wed Apr 23, 2003 9:58 pm   Post subject: (No subject)

...you can't use turing, because it doesn't output on STDOUT
sorry, its just I have it so its really easy to test them, but it only works if your program outputs on stdout.
jamez




PostPosted: Wed Apr 23, 2003 10:20 pm   Post subject: (No subject)

lmfao...whatever
Tony




PostPosted: Wed Apr 23, 2003 10:32 pm   Post subject: (No subject)

well if it outputs to STDOUT then you can have an automated judge that can mark programs online.... the problem with prime numbers is that since multiple solutions are already discussed on this site a program will result in infinite number of points or a tie for first place Confused

Oh, and in future if anyone comes up with a contest that people would participate in, compsci.ca staff will contribute to the prizes (most likely bits and emails if we feel generous)
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
octopi




PostPosted: Thu Apr 24, 2003 12:02 pm   Post subject: (No subject)

yeah tony's right, its automated, and it only works if they output on stdout.
I don't see the problem with the primes thing, mostly because isn't all the primes stuff on this site in turing? (Can't use turing)

Anyways, thats only the first task, and there will probally only be 5-10 points(tests) per question.
jamez




PostPosted: Thu Apr 24, 2003 2:40 pm   Post subject: (No subject)

lol

its not that hard to convert from turing to c/c++ (usually Smile)
Martin




PostPosted: Thu Apr 24, 2003 3:06 pm   Post subject: (No subject)

1's not prime
Tony




PostPosted: Thu Apr 24, 2003 5:59 pm   Post subject: (No subject)

good point... but 2 is Very Happy
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Contests
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 12 Posts ]
Jump to:   


Style:  
Search: