Skip to content

Commit

Permalink
Added sqaring method
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmccullough committed May 7, 2011
1 parent 755fd57 commit 32c2737
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Main.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ def name = "Matthew"
println "Hello ${name}"

int programmingPoints = 10
println "${name} has at least ${programmingPoints} programming points."
println "${name} has at least ${programmingPoints} programming points."

println "${programmingPoints} squared is ${square(programmingPoints)}"

int square(int base) {
base * base
}

0 comments on commit 32c2737

Please sign in to comment.