stefan1919

Loops + arrays + string.join

Dec 18th, 2015
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub Main()
  2.         Dim fromWhich As String = Console.ReadLine()
  3.         Dim arrayOfFahrenheit(101) As Double
  4.         If fromWhich = "celsius" Then
  5.             For degree As Integer = 0 To 100
  6.                 arrayOfFahrenheit(degree) = CDbl((9 / 5) * degree - 32)
  7.             Next
  8.         End If
  9.         Console.WriteLine(String.Join(",", arrayOfFahrenheit))
  10.     End Sub
Advertisement
Add Comment
Please, Sign In to add comment