Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- str="abcdefghijklmnopqrstuvwxyz"
- while 0
- rnd=rand(26)
- ch=str[rnd]
- fileName=ch+"2.txt"
- puts fileName
- fl = File.open(fileName)
- lineCnt=fl.lines.count
- fl.close
- fl=File.open(fileName)
- (1..5).each do |cnt|
- rnd=rand(lineCnt-1)
- puts rnd
- end
- fl.close
- puts "Do you want to continue(Type 1 or 2)"
- puts "1)Yes"
- puts "2)No"
- inp=gets.chomp
- if inp=="NO"||inp=="No"||inp=="N"||inp=="n"||inp=="2"
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement