A challenge for computer programmers to solve a numeral question!

Dec 19, 2008

Invite your friends to the Challenge:

Let’s have a nice challenge here. Every thing is clear and simple to understand. But I just want to invite you to think more about this question and then design an algorithm about it and then make a code about it and send it to me via Email: stayupdate.com@gmail.com

Well, as I said the question is much clear and easy to understand. But almost a few students can solve it well. Who had better algorithm performance and shorter source code would be the WINNER!

 

The question:

The program should have this parameters:

INPUTS:

A) 3 points and their positions: A(a_i,a_j) B(b_i,b_j) C(c_i,c_j)

Note: It should be possible to make a triangle by connecting the points above.

B) Another point and it’s position: point(p_i,p_j)

 

OUTPUT:

- The program should determine that:

1) Is the point out of the triangle? ( In this case the program should print: out)

stayupdate.com-A simple challenge- out

 

2) Is the point on the triangle? ( In this case the program should print: on)

stayupdate.com-A simple challenge- on

 

3) Is the point in the triangle? ( In this case the program should print: in)

stayupdate.com-A simple challenge- in

 

Don’t forget to invite your friends to this challenge!

I am awaiting for the WINNER!

GOOD LUCK!

Related Posts

4 Responses

  1. User Gravatar Tomas
    8:06 pm on December 21st, 2008

    What is the prize of winning ? I mean if there is no prize you won’t get pretty solutions.

  2. User Gravatar Andrew Patterson
    8:15 pm on December 22nd, 2008

    This looks interesting, I hope we get to see some interesting results!

  3. User Gravatar admin
    8:36 pm on December 22nd, 2008

    stayupdate.com:
    Are you sure that you can solve it?
    The best people who are successful in their life never think about their results.
    So, let’s just thing about the solution before thinking about the result and the prize.

  4. User Gravatar José Henrique Fernandes
    9:36 pm on February 2nd, 2009

    If you think is not so difficult

    There are mathematical formula that solves this problem.

What do you think?