Deloitte interview question

Please write a java code using a for loop.