All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Temperature Temperament (Posted on 2013-03-06) Difficulty: 2 of 5
Determine all possible values of a positive integer x satisfying:

x degrees Fahrenheit = sod(x) degrees Celsius, where sod(x) denotes the sum of the digits in the base ten expansion of x.

Prove that there are no others.

Note: To convert from degrees Fahrenheit to Celsius, subtract 32 then multiply by 5/9. To convert the other way, simply do the opposite (multiply by 9/5 and add 32).

See The Solution Submitted by K Sengupta    
Rating: 3.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution program for solution (spoiler) | Comment 2 of 3 |

DECLARE FUNCTION sod! (x!)
FOR c = -100 TO 10000
  f = c * 9 / 5 + 32
  IF f = INT(f) THEN
    IF c = sod(f) THEN
       PRINT f, c
    END IF
  END IF
NEXT

FUNCTION sod (x)
  s = 0
  st$ = LTRIM$(STR$(x))
  FOR i = 1 TO LEN(st$)
    s = s + VAL(MID$(st$, i, 1))
  NEXT
  sod = s
END FUNCTION

F             C
41            5

  Posted by Charlie on 2013-03-06 11:34:08
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information