There was one kind of question which I really liked and I thought to share those.

We had to give the shortest way to express following 5 things in function of min(a,b) , max (a,b) (which return respectively the minimum and the maximum of the 2 given parameters) ,+,-,/ and *.

1. The greatest of 3 numbers a b and c

2. The absolute value of any number a.

3. The difference between a and the one closest to a. (a b and c as inputs)

4. If a<b: return 0 ; else return b (a and b are positive and a is not b)

5. same as 4. but a and b are integers. (note that for integers 3/5 is not 0.6 but 0 and a remainder of 3). This one should be shorter than the solution of 4.

5 was the only question I didn't answer correctly. Can you find the solutions to all 5?

]]>There is no required knowledge of any programming language, so it's just about the logics behind programming and a few algorithms.

In fact I don't know many of them. The only one I could think of is Dijkstra's algorithm and the shunting yard algorithm.

But I am sure that they won't ask anything about the shunting yard algorithm and dijkstra seems very intresting.

Now my question is if you know a few algorithms which could be useful? I don't think they will ask anything about arithmetic stuff such as karatsuba and fourier(?) for multiplication and stuff.

Thanks in advance.

]]>it is a quite good program but it's dated from 2001 I believe, so it is old. I was wondering if there are more programs like this because I have been searching for it for a quite long time but I can not find it.

I would also be interested in some real version of this but I don't know where to find it either.

Can anyone help me out? ]]>

` ``#lang racket (require picturing-programs) (require racket/math) (require racket/draw) (define (draw image) (define (grey-function x y red green blue) (define n (floor (+ (* .587 green) (* .299 red) (* .114 blue)))) (cond [(< n 42.5) 0] [(< n 127.5) 85] [(< n 212.5) 170] [else 255] )) (map3-image grey-function grey-function grey-function (scale .5 image)))`

I scaled the images down, since the calculator screen is so small. This can be adjusted. The brightness/darkness can be adjusted by changing the 42.5, 127.5, and 212.5.

To run the program, you would need an environment (DrRacket). A bit annoying, but oh well.

I might make a similar program in Java soon.

]]>1. Respect others

It is also strongly discouraged to not make any negative remarks that will attack another's ethnic/cultural/religious affiliation. This includes individuals as well as groups. This does not mean that you can't point out that something is wrong. You must provide some evidence for your reasoning.

Ok: I think Bush has a bad Iraq policy, as well as a bad domestic policy.

Not OK: Bush is stupid.

2. Illicit Materials are strictly forbidden

This includes illegal copies of anything, pornography, instructions on assembling anything illegal, and any advertising of products.

3. Keep on topic

Try to keep on topic as much as possible. If the topic is about creating the ultimate calculator, don't start talking about how bad you did on your English final.

4. Profanity

Profanity is allowed, but we ask you to not use it or use it in moderation. Find alternative words that express your opinion, but also are not quite as offensive to others.

5. Double posting

Don't double post. Use the edit button instead. Double posts will be merged with the previous post.

6. Repeat Topics

If you think your topic is a repeat of one that has already been started, look there first to see if you can find what you need. We don't need 50 topics on who you think is going to win the Super Bowl.

Thank you for reading this first. This forum is designed specifically to allow for general coding discussion. This includes TI-Basic, C(++) Java, VB, etc. Please keep this in mind before starting a new topic in this forum. If you think anything is missing, please contact a site administrator.

]]>