I have to make a program that converts Fahrenheit to celsius or Celsius to Fahrenheit in the program "Just Basic" Using FUNCTIONS I followed all steps and wrote the correct formulas for conversion but the problem is that it does not correctly convert here is the code I been working on not finished still testing.
PRINT "PLEASE ENTER THE CONVERSION YOU WANT TO OCCUR ? "
PRINT "PLEASE PRESS 1 TO CONVERT FAHRENHEIT TO CELCIUS OR PRESS 2 TO CONVERT CELCIUS TO FAHRENHEIT"
INPUT NUMBER
INPUT "PLEASE ENTER THE DEGREE TO CONVERT ";DEGREE
IF NUMBER = 1 THEN GOTO [FC]
IF NUMBER = 2 THEN GOTO [CF]
[FC]
LET CONVERTFC = CONVERT1(DEGREE)
PRINT "YOUR CONVERTED NUMBER FROM FAHRENHEIT TO CELCIUS IS " ;CONVERTFC;
[CF]
LET CONVERTCF = CONVERT2(DEGREE)
PRINT "YOUR CONVERTED NUMBER FORM CELCIUS TO FAHRENHEIT IS " ;CONVERTCF;
FUNCTION CONVERT1(n)
CONVERT1 = 5/9 * (DEGREE - 32)
END FUNCTION
FUNCTION CONVERT2(m)
CONVERT2 = 9/5 * DEGREE + 32
END FUNCTION
2007-02-16
10:48:29
·
3 answers
·
asked by
Mike
3
in
Computers & Internet
➔ Programming & Design
Sorry first two answers dont work.
2007-02-16
11:01:48 ·
update #1
Thanks Vegan for your help I got it to work.
2007-02-16
13:31:26 ·
update #2
Answer one works
2007-02-16
13:36:55 ·
update #3