import java.lang.Math; public class NumberUtilities { public static String getRange(int start) { String answer = ""; for(int i = 0; i < start; i++){ String myString = String.valueOf(i); answer = answer.concat(myString); } return answer; } public static String getRange(int start, int stop) { String answer = ""; for(int i = start; i < stop; i++){ String myString = String.valueOf(i); answer = answer.concat(myString); } return answer; } public static String getRange(int start, int stop, int step) { String answer = ""; for(int i = start; i < stop; i += step){ String myString = String.valueOf(i); answer = answer.concat(myString); } return answer; } public static String getEvenNumbers(int start, int stop) { String answer = ""; for(int i = start; i < stop; i++){ if(i%2 == 0){ String myString = String.valueOf(i); answer = answer.concat(myString); } } return answer; } public static String getOddNumbers(int start, int stop) { String answer = ""; for(int i = start; i < stop; i++){ if(i%2!= 0){ String myString = String.valueOf(i); answer = answer.concat(myString); } } return answer; } public static String getExponentiations(int start, int stop, int exponent) { String answer = ""; for(int i = start; i <= stop; i++){ int expo = (int) Math.pow(i, exponent); String myString = String.valueOf(expo); answer = answer.concat(myString); } return answer; } }