I'm writing a console application which calculates the marks entered by user and shows Histogram when mark 101 is entered, so far i have managed to display horizontal histogram.
Question is how do rewrite it so the histogram will show stars * vertically?




This is the code i have so far

Dim Mark As Integrer
Dim Failed As Integer
Dim Pass As Integer
Dim GoodPass As Integer
Dim Excellent As Integer
Dim StudentsPassed As Integer






Console.WriteLine(" Marks:")
Console.WriteLine("Fail = 0 to 29 ")
Console.WriteLine("Pass = 30 to 39 ")
Console.WriteLine("Good Pass = 40 to 69")
Console.WriteLine("Excelent = 70 to 100 ")
Console.WriteLine()


While (Mark <= 100)


Console.WriteLine("Enter The Mark")


Mark = Console.ReadLine()


If (Mark >= 0) And (Mark <= 29) Then
Failed = Failed + 1
Console.WriteLine("Failed: " & Failed)
Console.WriteLine()
ElseIf (Mark >= 30) And (Mark <= 39) Then
Pass = Pass + 1
Console.WriteLine("Passed: " & Pass)
Console.WriteLine()
End If




If (Mark >= 40) And (Mark <= 69) Then
GoodPass = GoodPass + 1
Console.WriteLine("Good Pass: " & GoodPass)
Console.WriteLine()
End If




If (Mark >= 70) And (Mark <= 100) Then
Excellent = Excellent + 1
Console.WriteLine("Excellent: " & Excellent)
End If






End While
Console.WriteLine()




StudentsPassed = Pass + GoodPass + Excellent




Console.ForegroundColor = ConsoleColor.Red
Console.WriteLine("Total Of Students Passed: " & StudentsPassed)
Console.WriteLine("Total Of Students Failed: " & Failed)
Console.WriteLine("Total Number Of Students" & TotalStudents)
Console.ResetColor()




For Failed = 1 To Failed
Console.WriteLine(" *")
Next


Console.Write("Marks 0-29")
Console.WriteLine()


Console.Write("Marks 30-39")
For Pass = 1 To Pass
Console.Write("*")
Next
Console.WriteLine()




Console.Write("Marks 40-69")
For GoodPass = 1 To GoodPass
Console.Write("*")
Next
Console.WriteLine()




Console.Write("Marks 70-100")
For Excellent = 1 To Excellent
Console.Write("*")
Next
Console.ReadLine()