Console.WriteLine("Please input the length and width of your garden")
Dim x As Decimal = Console.ReadLine()
Console.WriteLine("The Area of your garden is " & x * Console.ReadLine())
Console.WriteLine("Give a temperature in Fahrenheit to convert to Celsius")
Dim F As Decimal = Console.ReadLine()
Console.WriteLine("The temperature in Celsius is " & (F - 32) * 5 / 9)
Console.WriteLine("What is the temperature?")
Dim C As Decimal = Console.ReadLine()
Console.WriteLine("It is freezing")
Console.WriteLine("It is not freezing")
Console.WriteLine("What is the temperature of the water?")
Dim C As Decimal = Console.ReadLine()
Console.WriteLine("The water is frozen")
Console.WriteLine("The water is liquid")
Console.WriteLine("The water is boiling")
Dim n = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}
Console.WriteLine("Give a number between 1 and 12")
Console.WriteLine("The month that corresponds to this number is " & n(Console.ReadLine() - 1))
Console.WriteLine("Input a number greater than 1, I will count up to that number")
Dim i As Integer = Console.ReadLine()
For n As Integer = 1 To i
Console.WriteLine("Input a number greater than 1, I will count down to 1 from that number")
Dim i As Integer = Console.ReadLine()
For n As Integer = i To 1 Step -1
Console.WriteLine("Input two numbers, I will count up to the first in intervals of the second")
Dim x As Integer = Console.ReadLine()
Dim y As Integer = Console.ReadLine()
Console.WriteLine("Give me 10 numbers, I will output the highest one")
Dim max As Decimal = Console.ReadLine()
Console.WriteLine("The greatest number is " & max)
Console.WriteLine("Give me 10 numbers, I will output the lowest one")
Dim least As Decimal = Console.ReadLine()
Console.WriteLine("The lowest number is " & least)
Console.WriteLine("Input a number between 1 and 5 (inclusive)")
Do Until num >= 1 And num <= 5
If num < 1 Or num > 5 Then
Console.WriteLine("This number is not valid")
Console.WriteLine("Thank you")
Console.WriteLine("Input 2 numbers, I will count from one to the other")
Dim x As Integer = Console.ReadLine()
Dim y As Integer = Console.ReadLine()
For i As Integer = 0 To 9
Console.Write(array(i) & " ")
For i As Integer = 0 To 9
Console.Write(array(i) & " ")
Console.WriteLine("Give me a number between 1 and 10 to add 1 to the number in that position in the array. Type 0 to see the array")
If i <= 10 And i >= 1 Then
Console.WriteLine("That's not a number between 1 and 10")
For n As Integer = 0 To 9
Console.Write(array(n) & " ")
Dim array(4, 4) As Integer
Console.Write(array(x, y) & " ")
Dim array(4, 4) As Integer
Console.WriteLine("Give me two numbers between 1 and 5 to add 1 to the number in that coordinate in the array. Type 0 to see the array")
If i <= 5 And i >= 1 And j <= 5 And j >= 1 Then
ElseIf i = 0 Or j = 0 Then
Console.WriteLine("That's not a number between 1 and 5")
Console.Write(array(x, y) & " ")
Console.WriteLine("Input a single character, I will give the corresponding ASCII code")
Console.WriteLine("The corresponding ASCII code is " & Asc(x))
Console.WriteLine("Please enter a single character")
Console.WriteLine("Input an ASCII integer code, I will give the corresponding ASCII character")
Dim x As Object = Console.ReadLine()
If IsNumeric(x) = True Then
If x >= 0 And x < 256 Then
Console.WriteLine("The corresponding ASCII character is " & Chr(x))
Console.WriteLine("Please enter a valid code")
Console.WriteLine("Please input an integer")
Console.WriteLine("That is not a number")
Console.WriteLine("Please write a sentence, I will tell you the number of letters and spaces in your sentence")
Dim x As String = Console.ReadLine()
Console.WriteLine("Your sentence has " & x.Length & " characters")
Console.WriteLine("Please write a sentence, I will tell you the two leftmost characters")
Dim x As String = Console.ReadLine()
Console.WriteLine("The two leftmost characters are " & x.Substring(0, 1) & " and " & x.Substring(1, 1))
Console.WriteLine("Your string is too short")
Console.WriteLine("Please write a sentence, I will tell you the two rightmost characters")
Dim x As String = Console.ReadLine()
Console.WriteLine("The two rightmost characters are " & x.Substring(x.Length - 2, 1) & " and " & x.Substring(x.Length - 1, 1))
Console.WriteLine("Your string is too short")
Console.WriteLine("Please write a sentence, I will tell you the centremost character(s)")
Dim x As String = Console.ReadLine()
Dim y As Decimal = x.Length / 2
Console.WriteLine("The two centremost characters are " & x.Substring(y - 1, 1) & " and " & x.Substring(y, 1))
Console.WriteLine("The centremost character is" & x.Substring(y - 0.5, 1))
Console.WriteLine("Your string is too short")
Console.WriteLine("Enter a first name")
Dim name1 As String = Console.ReadLine()
Console.WriteLine("Enter a last name")
Dim name2 As String = Console.ReadLine()
Console.WriteLine("The full name is " & name1 & " " & name2)
Console.WriteLine("Enter a first name")
Dim name1 As String = Console.ReadLine()
Console.WriteLine("Enter a last name")
Dim name2 As String = Console.ReadLine()
Dim nameFull As String = name1 & " " & name2
Console.WriteLine("The full name is " & nameFull)
Console.WriteLine("Give me a decimal number, I will round it to the nearest whole number")
Dim x As Decimal = Console.ReadLine()
Console.WriteLine("When rounded, your decimal becomes " & Math.Round(x))
Console.WriteLine("Enter an integer to get 5 random integers between 1 and your number")
Dim n As Integer = Console.ReadLine()
For i As Integer = 0 To 4
Console.Write(Math.Round((n - 1) * Rnd() + 1) & " ")
Dim filePath As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
Dim fileName As String = filePath & "\testfile.htm"
Dim input As System.IO.StreamWriter = New IO.StreamWriter(fileName, True)
input.WriteLine("I don't know what I'm doing")
Dim output As StreamReader = New StreamReader(fileName)
Dim outputData As String = output.ReadToEnd()
Console.WriteLine(outputData)
Dim filePath As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
Dim fileInput As String = filePath & "\testfile.htm"
Dim newFile As String = filePath & "\testfile2.htm"
Dim output As StreamReader = New StreamReader(fileInput)
Dim outputData As String = output.ReadToEnd()
Dim input As System.IO.StreamWriter = New IO.StreamWriter(newFile, True)
input.WriteLine(outputData)
Dim filePath As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
Dim fileName As String = filePath & "\testfile.htm"
Dim input As System.IO.StreamWriter = New IO.StreamWriter(fileName, True)
input.WriteLine("I don't know what I'm doing")