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

Home > Just Math
Square Temperatures (Posted on 2016-06-29) Difficulty: 3 of 5
Each of M+N and M-N is a nonzero perfect square and:

Mo Celsius= No Fahrenheit

Find the smallest value of M+N. What is the next smallest value of M+N?

*** F = 9*C/5 + 32, where F and C respectively represents Fahrenheit and Celsius scales of temperatures.

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

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Assuming... | Comment 2 of 3 |
In all instances, either both Fahrenheit and Celsius are negative, making the sum negative, or the Fahrenheit value is larger than the Celsius value, so I assume that the difference is meant to be N-M, that is, the Fahrenheit reading minus the Celsius reading. The results make that assumption:

   M       N         M+N   N-M
    40     104        144     64
   680    1256       1936    576
 58280  104936     163216  46656
633640 1140584    1774224 506944

DefDbl A-Z
Dim crlf$


Private Sub Form_Load()
 Form1.Visible = True
 
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 For c = -273 To 1000000# Step 0.5
   DoEvents
   f = c * 9 / 5 + 32
   sq1 = c + f: sq2 = f - c
    If sq1 > 0 Then
      If f > c Then
         sr = Int(Sqr(sq1) + 0.5)
         If sr * sr = sq1 Then
            sr = Int(Sqr(sq2) + 0.5)
            If sr * sr = sq2 Then
                      Text1.Text = Text1.Text & c & Str(f) & "   " & Str(c + f) & Str(f - c) & crlf
            End If
         End If
       Else
      End If
    End If
 Next
 
 Text1.Text = Text1.Text & " done"
  
End Sub


  Posted by Charlie on 2016-06-29 16:27:56
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 (15)
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