Last active
          June 13, 2017 20:03 
        
      - 
      
 - 
        
Save marcgeld/4f2fe87be7ac78e507f8babd1e74c6b9 to your computer and use it in GitHub Desktop.  
    Groovy scanner
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env groovy | |
| print "enter number: " | |
| System.in.eachLine() { line -> | |
| n = line.trim().toInteger() | |
| (1..10).each{ | |
| int res = n * it | |
| println "${n} x ${it} = ${res}" | |
| } | |
| print "enter a new number: " | |
| } | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment