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

Home > Numbers
Temperature Reflection (Posted on 2003-09-29) Difficulty: 2 of 5
On my way to work, I pass by a digital thermometer outside a bank that displays the temperature to the nearest integer, alternating back and forth between Fahrenheit and Celsius at four-second intervals.

The other day, when I was going to work, I noticed that the temperatures displayed in Fahrenheit and Celsius were simply reverse digits of each other.

Well, it warmed up nicely during the day, and when I was on my way home, I looked at the same thermometer.
Imagine my shock when, again, the Fahrenheit and Celsius temperature displays were simply reversed digits of each other!

What was the temperature when I came in to work, and what was it when I was on my way home?

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). Ignore leading zeroes.

See The Solution Submitted by DJ    
Rating: 4.2857 (14 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 4 of 11 |
FOR f = 10 TO 99
  c1 = INT((f - 32.5) * 5 / 9 + .5)
  c2 = INT((f - 31.5) * 5 / 9 + .5)
  f$ = LTRIM$(STR$(f))
  c1$ = LTRIM$(STR$(c1))
  c2$ = LTRIM$(STR$(c2))
  IF RIGHT$(f$, 1) = LEFT$(c1$, 1) AND RIGHT$(c1$, 1) = LEFT$(f$, 1) THEN
      PRINT f, c1
  END IF
  IF RIGHT$(f$, 1) = LEFT$(c2$, 1) AND RIGHT$(c2$, 1) = LEFT$(f$, 1) THEN
      PRINT f, c2
  END IF
NEXT

does come out with the same

61 16
61 16
82 28
82 28

----------
(listed twice each due to checking lower and upper limits of the Fahrenheit possibilities for each degree)

Seeing abc's comment, I note that if 44 F were equivalent to 4 C (which it's not), the program would have found this as a match, as lengths weren't checked.
  Posted by Charlie on 2003-09-29 11:00:07
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 (19)
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