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
jok3333 [9.3K]
3 years ago
11

Write a statement that increases numPeople by 5. Ex: If numPeople is initially 10, the output is: There are 15 people.

Engineering
1 answer:
BartSMP [9]3 years ago
8 0

Answer:

import java.util.Scanner;

public class AssigningNumberToVariable {

public static void main (String [] args) {

int numPeople;

int numPeople_inc;

numPeople = 10;

/* solution */

numPeople_inc=numPeople+5;

System.out.print("There are ");

System.out.print(numPeople_inc);

System.out.println(" people.");

}

}

Explanation:

1. Declare a new variable called: numPeople_inc

2. Add 5 each time: numPeople_inc=numPeople+5;

3. Print the answer:  numPeople_inc=numPeople+5;

Optional, just write the line in the place where says: " your solutions goes here":

numPeople = numPeople+5;

You might be interested in
Cuál de las siguientes es la mejor manera de practicar sus habilidades de tecnología de secundaria?
Mkey [24]
Huh? Do you know English?
8 0
3 years ago
A good rule of thumb in hazardous conditions is to _____.
Aloiza [94]

Answer:

C. Have your hazard lights on

Explanation:

Speeding up will cause an accident

Counter steering is not easy to do

Slowing down my result in you being rear ended

5 0
3 years ago
Read 2 more answers
Now that we have a second enemy, you will need to make some changes to the script that is attached to your backdrop. Look at tha
JulsSmile [24]

Answer:

<u><em>≡</em></u>

Explanation:

8 0
3 years ago
Technician A says vehicles with electronic throttle control do not need a separate cruise control module, stepper motor, or cabl
8_murik_8 [283]

Answer: its A

Explanation:

3 0
3 years ago
To produce cooling the refrigerant much
lawyer [7]
Yes that is correct good job ❤️
7 0
3 years ago
Other questions:
  • A series AC circuit contains a resistor, an inductor of 250 mH, a capacitor of 4.40 µF, and a source with ΔVmax = 240 V operatin
    9·2 answers
  • An Ideal gas is being heated in a circular duct as while flowing over an electric heater of 130 kW. The diameter of duct is 500
    11·1 answer
  • According to the eNotes, a program that eliminates sales and promotions in an effort to minimize the bullwhip effect would be ca
    13·1 answer
  • The primary transformer voltage is 2.8 kV and the secondary is 230 V. The transformer is connected to a variable load (0 to 300
    8·1 answer
  • A metal bar has a 0.6 in. x 0.6 in. cross section and a gauge length of 2 in. The bar is loaded with a tensile force of 50,000 l
    8·1 answer
  • A 13.7g sample of a compound exerts a pressure of 2.01atm in a 0.750L flask at 399K. What is the molar mass of the compound?a. 3
    15·1 answer
  • What does the current in a semi-conductor is produced by?
    15·2 answers
  • Three-dimensional measuring references all of these EXCEPT:
    10·1 answer
  • The seers were of the opinion that_____ . *
    14·1 answer
  • What does it mean to say that PEER is a data-driven, consumer-centric, and comprehensive system?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!