Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+6 votes
asked in CSC211_Winter2018 by (1 point)

3 Answers

+7 votes

Scanner console=new Scanner(System.in);
int =console.nextInt();

answered by (1 point)
+5 votes

Scanner console = new Scanner (System.in);
int = console.nextInt ();

answered by (1 point)
+4 votes

Neither of those answers prompt the user. Prompting the user is a print statement telling the using what to enter.

Scanner console = new Scanner(System.in);

System.out.print("Enter quiz score: "); // this is the prompt
int score = console.nextInt(): //this reads a token from the input stream storing it an int into the variable score

answered by (1 point)
...