Question: ttps://learn.zybooks.com/zybook/CS226-2503A-04-2503A_2 ooks My library > CS 226T: Java Programming home > 1.6: More on variables zyBooks catalog CHALLENGE ACTIVITY 1.6.2: Adding a number to a

ttps://learn.zybooks.com/zybook/CS226-2503A-04-250
ttps://learn.zybooks.com/zybook/CS226-2503A-04-2503A_2 ooks My library > CS 226T: Java Programming home > 1.6: More on variables zyBooks catalog CHALLENGE ACTIVITY 1.6.2: Adding a number to a variable. Write a statement that increases numPeople by 5. Ex: If numPeople is initially 10, the output is: There are 15 people. Learn how our autograder works 671454.4845184.qx3zay7 1 import java. util. Scanner; public class AssigningNumber ToVariable { public static void main(String args) { Scanner sonr = new Scanner (System. in) ; int numPeople; numPeople = scnr . nextInt( ); 10 int numPeople=numPeople+5; System. out . print ( "There are " ) ; 13 System. out . print (numPeople) ; 14 System. out . printIn(" people.") ; 15 16 7 Run Failed to compile 1 Hot days ahead Q Search hulu 87OF

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!