//This code will help you to take the input from user and it will run till you reach 9999999. You can edit this later.
import java.util.Scanner; public class