-
December 20th, 2003, 12:13 PM
#1
Temperature Reading & Conversion
Hi all was hopin someone could help me with the following:
Requirements:
Write a skeleton program that reads the temperature froma temperature measuring device and didplays this in degrees centigrade or optionally farenheit on a user interface.
Would be grateful if someone could give me code fot this.
-
December 20th, 2003, 12:37 PM
#2
Clipper .. the purpose of this forum is NOT for us to do your homework for you, rather it is a place for you to ask questions on something that you are having trouble understanding or getting the proper results from.
If anyone here did your homework for you ... what did you learn from it ... and what value is an A of F grade to us from an instructor we have no interaction with?
-
December 20th, 2003, 05:25 PM
#3
Without doing your homework, I'll tell you this:
To get the farenheit value, multiply the centigrade value by 1.8 and then add 32.
Knowing that, you should be able to write the code easily. All you need to do is to create a formula for converting farenheit to Celsius, and write a few lines of code to handle the input/output. That should be an easy task.
-
December 20th, 2003, 11:14 PM
#4
To Convert Fahrenheit To Celsius: C = ( ( ( F - 32 ) / 9 ) * 5 )
To Convert Celsius To Fahrenheit: F = ( ( ( C * 9 ) / 5 ) + 32 )
But those are the formulas..
-
December 21st, 2003, 10:18 AM
#5
Thanks for the help so far this is what I have come up with
'var declaration
Dim a, b As Double
Dim c As String
Private Sub Command1_Click()
b = (a * 1.8) + 32
Label1.Caption = "Howdy " + c + " the temperature is " & b
End Sub
'cleaning
Private Sub Command2_Click()
a = 0
b = 0
c = ""
Label1.Caption = ""
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End Sub
think this should work but not sure. still confused about reading in from the temp device so any help would be appreciated
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|