More a math question than an algorithm

This is a discussion on More a math question than an algorithm within the C Programming forums, part of the General Programming Boards category; Hi. This is more a math question: "The adition of the square of two numbers X and Y is iqual ...

  1. #1
    Registered User
    Join Date
    Nov 2001
    Location
    Mexico City
    Posts
    33

    More a math question than an algorithm

    Hi.

    This is more a math question:

    "The adition of the square of two numbers X and Y is iqual to some number between 1000 and 10000. If you multiply X by 100 and then you add Y, you have that number.
    Which would be the values of X and Y. (2 solutions)

    I made a program to solve this and it worked, but I don't know a mathematical method.

    Does anyone feels confident? I would aprecciate it!

    Gustaff.
    If you want to be happy one hour: take a nap
    if you want to be happy one day: go fishing
    If you want to be happy a year: inherit a fortune
    if you want to be happy for a life time: HELP SOMEBODY
    chinisse say.

  2. #2
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728
    I think to figure it out you solve a system of 3 equations:

    x^2 + y^2 = 100x + y
    100x + y > 100
    100x + y < 10000

    Solve this system and you should have the answer. Been awhile since I've done this though

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. math question
    By kryptkat in forum Tech Board
    Replies: 6
    Last Post: 05-04-2006, 07:52 AM
  2. Math Question
    By Joselo16 in forum C++ Programming
    Replies: 8
    Last Post: 05-20-2005, 09:46 PM
  3. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 03:57 PM
  4. Algorithm question
    By PJYelton in forum C++ Programming
    Replies: 2
    Last Post: 10-28-2002, 10:52 AM
  5. Math Question
    By DarkEldar77 in forum C++ Programming
    Replies: 2
    Last Post: 09-17-2001, 01:52 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21