You are on page 1of 1

import java.util.

Scanner;

public class Betting {


public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);

// Prompt the user to enter their age


System.out.print("Enter your age: ");
int age = scanner.nextInt();

// Clear the newline character from the buffer


scanner.nextLine();

// Prompt the user to enter their name


System.out.print("Enter your name: ");
String name = scanner.nextLine();

// Prompt the user to enter their telephone number


System.out.print("Enter your telephone number: ");
String phoneNumber = scanner.nextLine();

// Display the entered information


System.out.println("Age: " + age);
System.out.println("Name: " + name);
System.out.println("Telephone Number: " + phoneNumber);

// Close the scanner


scanner.close();
}
}

You might also like