G2A Many GEOs
SHARE
TWEET

Untitled

a guest Apr 9th, 2020 130 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. object ciklus {
  2.   def main(args: Array[String]) {
  3.     var i = 0
  4.     var ossz = 0
  5.     var legkisebb = 999
  6.     var legnagyobb = 0
  7.     var a = 0
  8.     do {
  9.       a = Console.in.readLine().toInt
  10.       i = i + 1
  11.       ossz = ossz + a
  12.       if ((a <  legkisebb ) && (a!=0)) {
  13.         legkisebb = a
  14.       }
  15.       if (a > legnagyobb) {
  16.         legnagyobb = a
  17.       }
  18.     }
  19.     while (a != 0)
  20.     var atlag= ossz/i
  21.   printf("Ennyi darab szam "+i)
  22.     println()
  23.     printf("A szamok osszege"+ ossz)
  24.     println()
  25.     printf("Legkisebb szam" + legkisebb)
  26.     println()
  27.     printf("Legnagyobb szam" + legnagyobb)
  28.     println()
  29.     printf("Atlag "+ atlag )
  30.  
  31.  
  32.   }
  33.  
  34. }
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