Groovy web console

subscribe to the feed Subscribe
to this
site

1

Published 2 months ago by 2 with tags 2
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def cal(int ttl, int num) {
    def  newttl = ttl
    if(ttl%num!=0) {
        newttl = num * (int)(ttl/num + 1)
    } 
    //return newttl
    1.upto(newttl/num -1) {
        
    
}

println cal(103,10)