Dim temperatures(7, 3) As Integer
Dim mintemps1, maxtemps1, mintemps2 (3), maxtemps2(3) As Integer
Dim avgst(3), avgsd As Double
Dim i, j, sumt(3), maxt(3), mint(3), sumd, mind,maxd As Integer
Dim neg, above20, sumdays(7) as integer
Console.WriteLine("Give temperature: ")
temperatures(i,j) = Int32.Parse(Console.ReadLine())
if temperatures(i,j) < 0 then
sumdays(i) = sumdays(i) + temperatures(i,j)
if temperatures(i,j) > 20 then
sumd = sumd + temperatures(i,j)
if maxd<temperatures(i,j) then
if mind>temperatures(i,j) then
sumt(j) = sumt(j) + temperatures(i,j)
if maxt(j)<temperatures(i,j) then
maxt(j) = temperatures(i,j)
if mint(j)>temperatures(i,j) then
mint(j) = temperatures(i,j)
Console.WriteLine ("Η μέγιστη θερμοκρασία για την ώρα " & times(i) & " is " & maxt(i) & " βαθμοί")
Console.WriteLine ("Η ελάχιστη θερμοκρασία για την ώρα " & times(i) & " είναι " & mint(i) & " βαθμοί")
Console.WriteLine ("Η μέση θερμοκρασία για την ώρα " & times(i) & " είναι " & avgst(i) & " βαθμοί")
Console.WriteLine("Η μέγιστη θερμοκρασία για ολόκληρη την εβδομάδα είναι " & maxd & " βαθμοί")
Console.WriteLine("Η ελάχιστη θερμοκρασία για ολόκληρη την εβδομάδα είναι " & mind & " βαθμοί")
Console.WriteLine("Η μέση θερμοκρασία για ολόκληρη την εβδομάδα είναι " & avgsd & " βαθμοί")
Console.WriteLine("Το πλήθος των θερμοκρασιών υπό το μηδέν είναι " & neg)
Console.WriteLine("Το πλήθος των θερμοκρασιών άνω των 20 βαθμών είναι " & above20)
if temperatures(i,j) > 20 then
Console.WriteLine("Η μέρα " & i & " είχε μέρα > 20 βαθμών και μέσο όρο θερμοκρασίας " & sumdays(i)/3)
Console.WriteLine("ΘΕΡΜΟΚΡΑΣΙΕΣ ΕΒΔΟΜΑΔΑΣ")
Console.Write(temperatures(i,j) & " ")