SlideShare une entreprise Scribd logo
1  sur  1
100   CLS : KEY OFF : INPUT "Input temp. Celsius(C) Fahrenheit(F) Kelvin(k)";T$
102   IF T$ = "F" OR T$ = "f" THEN 105
103   IF T$ = "C" OR T$ = "c" THEN 115
104   IF T$ = "K" OR T$ = "k" THEN 125
105   INPUT "Input temperature F";F:
109   C = 5/9 * (F-32)
110   K = C + 273.15 : GOTO 200
115   INPUT "Input temperature C";C:
116   F = 9/5 * C +(32)
117   K = C + 273.15 : GOTO 200
125   INPUT "Input temp K.";K
130   C = K - 273.15
134   F = 9/5 * C +(32)
200   PRINT F;"F",C;"C",K"k." : END

Contenu connexe

Plus de Donald Stevens (20)

Compton21
Compton21Compton21
Compton21
 
Doc2
Doc2Doc2
Doc2
 
Fluc7
Fluc7Fluc7
Fluc7
 
Fluc6
Fluc6Fluc6
Fluc6
 
Fluc5
Fluc5Fluc5
Fluc5
 
Fluc4
Fluc4Fluc4
Fluc4
 
Fluc3
Fluc3Fluc3
Fluc3
 
Fluc2
Fluc2Fluc2
Fluc2
 
Fluc1
Fluc1Fluc1
Fluc1
 
Stanley285
Stanley285Stanley285
Stanley285
 
Photomat3
Photomat3Photomat3
Photomat3
 
Stan363
Stan363Stan363
Stan363
 
Mat37
Mat37Mat37
Mat37
 
Mat27
Mat27Mat27
Mat27
 
Rome
RomeRome
Rome
 
Redshift
RedshiftRedshift
Redshift
 
Kentarus
KentarusKentarus
Kentarus
 
Hawking22
Hawking22Hawking22
Hawking22
 
Compton5
Compton5Compton5
Compton5
 
Bsquark
BsquarkBsquark
Bsquark
 

Kelvin.bas

  • 1. 100 CLS : KEY OFF : INPUT "Input temp. Celsius(C) Fahrenheit(F) Kelvin(k)";T$ 102 IF T$ = "F" OR T$ = "f" THEN 105 103 IF T$ = "C" OR T$ = "c" THEN 115 104 IF T$ = "K" OR T$ = "k" THEN 125 105 INPUT "Input temperature F";F: 109 C = 5/9 * (F-32) 110 K = C + 273.15 : GOTO 200 115 INPUT "Input temperature C";C: 116 F = 9/5 * C +(32) 117 K = C + 273.15 : GOTO 200 125 INPUT "Input temp K.";K 130 C = K - 273.15 134 F = 9/5 * C +(32) 200 PRINT F;"F",C;"C",K"k." : END