Advertisement
RashedBQ

Untitled

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