- ©«¤l
- 6
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 57
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2021-7-3
- ³Ì«áµn¿ý
- 2025-3-5
|
©³¤U¬O§Ú´ú¸ÕChatGpt ªº°ÝÃD¡G
½Ð²£¥ÍµØ¤ó»PÄá¤ó¤¬´«ªºVBAµ{¦¡½X
µ²ªG²£¥Í¨âÓ¦Ûq¨ç¼Æµ{¦¡½X¦p¤U¡G
'±NµØ¤óÂà´«¬°Äá¤ó
Function FahrenheitToCelsius(fahrenheit As Double) As Double
Celsius = (fahrenheit - 32) * 5 / 9
FahrenheitToCelsius = Celsius
End Function
'±NÄá¤óÂà´«¬°µØ¤ó
Function CelsiusToFahrenheit(celsius As Double) As Double
fahrenheit = celsius * 9 / 5 + 32
CelsiusToFahrenheit = fahrenheit
End Function
¥¦¥t´£¨Ñ©³¤U¤@Ó¥¨¶°½d¨Ò¡G
Sub Example()
Dim celsius As Double
Dim fahrenheit As Double
celsius = 25 '³]¸mÄá¤ó·Å«×¬°25«×'
fahrenheit = CelsiusToFahrenheit(celsius) 'Âà´«Äá¤ó·Å«×¬°µØ¤ó·Å«×'
MsgBox "Äá¤ó " & celsius & " «×µ¥©óµØ¤ó " & fahrenheit & " «×¡C"
End Sub |
|