1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
antoniya [11.8K]
3 years ago
13

1. Type a statement that reads a user-entered integer into variable numUsers. Assume scnr already exists.

Computers and Technology
1 answer:
ASHA 777 [7]3 years ago
3 0

Answer:

Question 1:

int numUsers = scnr.nextInt();

Question 2:

public class OutputExample {

public static void main (String [] args) {

int numCars = 99;

Scannerscnr=new Scanner(System.in);

numCars=scnr.nextInt();

System.out.println("There are "+numCars+" cars");

return;

}

}

Question 3:

import java.util.Scanner;

public class Errors {

public static void main(String [] args) {

int userNum = 5;

System.out.println ("Predictions are hard. ");

System.out.print("Especially ");

System.out.print("about the future.");

System.out.println("Num is: "+userNum);

return;

}

}

Explanation:

In Question 1, the statement int numUsers = scnr.nextInt();  reads a new integer value from the keyboard and assigns it to the variable numUsers.

In question 2, Concatenation is used to format the print output.

In question 3, care is taken to fix each of the syntax errors (missing double quotes, semi-colon, concatenation)

You might be interested in
What two protocols are used for remote access to a server, using unencrypted and encrypted transmissions respectively? answer
drek231 [11]
Telnet or rsh and ssh, http and https, ftp and sftp or ftps ? How are you accessing the server?
8 0
3 years ago
The concept of ____ refers to the idea that the internet is designed for all content to be treated equally.
vitfil [10]
Net neutrality buddy boi
3 0
3 years ago
Design and implement a class called Sphere that contains instance data that represent the sphere’s diameter. Define the Sphere c
Zolol [24]

Answer:

Import java.awt.*;

import java.util.*;

public class Sprhere

{// Instance Data private double surfaceA, volume, r, diameter; //Constructors public Sphere ()

{r = 0;diameter = 0; surfaceA = 0;volume = 0;}

public Sphere (double radius, double d, double SA, double v)

{this. r = radius; this. diameter = d; this. surfaceA = SA;this.volume = v;}

//--------------------------------------------------------------------// Accesors.//--------------------------------------------------------------------public double get Radius()

{return r;}

public double get Diameter()

{return diameter;}

public double get SurfaceA()

{return surfaceA;}

public double get Volume()

{return volume;}

//--------------------------------------------------------------------// Mutators.//--------------------------------------------------------------------

3 0
3 years ago
One reward of starting your own business is _____.
Citrus2011 [14]

Answer:

the money.

Explanation:

7 0
3 years ago
Read 2 more answers
How to draw 5 resistors and voltage source in diagram?
Vilka [71]
I hope this help :) Feel free send me messages

3 0
3 years ago
Other questions:
  • Can someone help me out? I need to know what is 1 example of computer hacking?
    15·1 answer
  • Operating system software allows you to use your fingers, a mouse or other pointing device to select screen controls, such as bu
    5·2 answers
  • Is 49 greater than y? Which below is correct?
    12·1 answer
  • Which feature is needed to make enterprise application migrate to private cloud ?
    9·2 answers
  • Why did they meet their friend<br><br><br><br><br><br><br><br>​
    8·2 answers
  • Use the factorial operation to evaluate 4!.<br> 10<br> O 24<br> 04<br> 0 1
    15·1 answer
  • Explain how to create a constant variable. Give an example of creating a speed constant that does not include a decimal.
    8·2 answers
  • What does Technology mean to you?​
    9·2 answers
  • A team of researchers wants to create a program to analyze the amount of pollution reported in roughly 3,000 counties across the
    15·1 answer
  • * Describe the five components of a<br> computer
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!