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