|
|
Title | Make a cricket temperature calculator in Visual Basic .NET |
Description | This example shows how to make a cricket temperature calculator in Visual Basic .NET. |
Keywords | cricket, temperature, chirps, silly, game, VB.NET |
Categories | Miscellany, Algorithms, Puzzles and Games |
|
|
This is a silly little temperature calculator based on the fact that a cricket's chirp rate depends on the temperature. The temperature in degrees Fahrenheit is approximately the number of chirps per 15 seconds plus 40.
|
|
Dim chirps As Integer = Val(txtChirps.Text)
txtResult.Text = (chirps + 40).ToString("0")
|
|
|
|
|
|