Hey everyone :
I have written the following piece of code :
now Im asked to edit so it will ask the user to enter a single integer value n and then it should print out the first n of 3 , eg if 4 is entered the output should be : 0 3 6 9.
Im totaly lost , thanks for help !
I have written the following piece of code :
import java.util.Scanner;
public class question1 {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
int number = 0 ;
System.out.print("Please enter your number");
number = keyboard.nextInt();
while (number > 0)
{
System.out.print("*");
number --;
}
}
}
now Im asked to edit so it will ask the user to enter a single integer value n and then it should print out the first n of 3 , eg if 4 is entered the output should be : 0 3 6 9.
Im totaly lost , thanks for help !