daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Module Module1
  2.  
  3.     Sub Main()
  4.  
  5.         Dim min, max As Integer
  6.         Dim prosjek As Double
  7.         Dim rnd As Random = New Random()
  8.         Dim k, j As Integer
  9.         Dim niz100(99) As Integer
  10.         Try
  11.             Console.WriteLine("unesite donju granicu")
  12.             k = Console.ReadLine()
  13.             Console.WriteLine("unesite gornju granicu")
  14.             j = Console.ReadLine()
  15.  
  16.             For i = 0 To niz100.GetUpperBound(0)
  17.  
  18.                 niz100(i) = rnd.Next(k, j)
  19.             Next
  20.  
  21.             For Each item In niz100
  22.                 If max < item Then
  23.                     max = item
  24.                 End If
  25.                 If min > item Then
  26.                     min = item
  27.                 End If
  28.                 prosjek += item
  29.             Next
  30.             prosjek = prosjek / 100
  31.  
  32.             Console.Write("najveci broj   {0} ,        najmanji broj:  {1} ,   srednja Wrijednost:        {2}  ", max, min, prosjek)
  33.             Console.ReadKey()
  34.  
  35.         Catch ex As Exception
  36.             Console.WriteLine("unos je pogresan")
  37.             Main()
  38.         End Try
  39.     End Sub
  40.  
  41. End Module
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top