// Program to roll a die until confirm
// Author: Michael S. Branicky, 09/13/2007

import java.util.Scanner;

public class RollDieUntilConfirm {
  public static void main (String args[]) {

     int roll, userint;
 
     Scanner input = new Scanner(System.in);
    
    // initialization
    System.out.print("  Roll? (enter '1' for yes)");
    userint = input.nextInt();

    while (userint == 1) {                  // test
      // statement(s) to repeat
      roll = (int) (Math.random()*6) + 1;
      System.out.println("\nYou rolled a " + roll + "!");

      // update
      System.out.print("\n  Roll again? (enter '1' for yes)");
      userint = input.nextInt();
    }
  }
}
