Created
March 21, 2018 10:17
-
-
Save sapanparikh18/46bf44dd66dfd2790bd8ecef87e2394e to your computer and use it in GitHub Desktop.
This file contains 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
//1. | |
for(User user:userList){ | |
int year = getCurrentYear(); | |
int days = getDaysInYear(year); | |
int dailySalary = user.getSalary()/days; | |
println "Daily salary of "+ user.getName() +" is "+dailySalary; | |
} | |
//2. | |
int year = getCurrentYear(); | |
int days = getDaysInYear(year); | |
for(User user:userList){ | |
int dailySalary = user.getSalary()/days; | |
println "Daily salary of "+ user.getName() +" is "+dailySalary; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment