Turning numbers into asterisks.
I've only been working with java for probably two weeks so you'll have to excuse the mess. The program I have here has an array set for a high number, runs down and asks the user to input numbers (assuming numbers are in increments of 100), then divides the numbers by 100 and outputs them. What I'm looking to do is instead of just outputting the numbers, I'd like to have asterisks represent for numbers. For every 100 that the user types in, will output a single *. So say the user inputs 1400, it divides it by 100, from this point, how do I get an output of **************?
Thanks in advance!
public class Astericks3
* @param args
public static void main(String args)
int exitCheck = 0; //used to exit loop when 999 is typed
int salesCount = 1; //used to help indicate order during final output
int Count = -1; //used to cut off the 999 once exited loop
int inputSales = new int;
Scanner input = new Scanner(System.in);
System.out.println("Please enter first sales figure");
for (int i = 0; i < inputSales.length; i++ )
if(exitCheck != 999)
inputSales[i] = input.nextInt();
System.out.println("Enter next sales figure, or 999 to exit: ");
exitCheck = inputSales[i];
//dividing the input by 100
for (int i = 0; i < Count; ++i)
inputSales[i] = inputSales[i]/100;
for ( int i = 0; i < Count; ++i )
System.out.println("Number " + salesCount + " sales: " + inputSales[i]);