Advertisement
RashedBQ

recurring number

Jul 6th, 2021 (edited)
53
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fun main(args: Array<String>) {
  2.  
  3.     var mo=0
  4.     var myarry=Array<Int>(10){0}
  5.     for (i in 0 until myarry.size){
  6.         println("Enter the num")
  7.         myarry[i]= readLine()!!.toInt()
  8.  
  9.     }
  10.     println("Enter num")
  11.     var num2= readLine()!!.toInt()
  12.  
  13.     for (b in 0 until  myarry.size){
  14.         if (myarry[b]==num2)mo++
  15.  
  16.         }
  17.     println("the number  $num2 is repeated  $mo")
  18.     }
  19.  
  20.  
  21.  
  22.  
Advertisement
RAW Paste Data Copied
Advertisement