CHALLENGE ACTIVITY 412080 2661056x3y7 Jump to level 1 Given integer variables numitems and boxCapacity, if numitems is 1

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

CHALLENGE ACTIVITY 412080 2661056x3y7 Jump to level 1 Given integer variables numitems and boxCapacity, if numitems is 1

Post by answerhappygod »

Challenge Activity 412080 2661056x3y7 Jump To Level 1 Given Integer Variables Numitems And Boxcapacity If Numitems Is 1 1
Challenge Activity 412080 2661056x3y7 Jump To Level 1 Given Integer Variables Numitems And Boxcapacity If Numitems Is 1 1 (32.24 KiB) Viewed 39 times
CHALLENGE ACTIVITY 412080 2661056x3y7 Jump to level 1 Given integer variables numitems and boxCapacity, if numitems is 150 or less, then subtract 150 from boxCapacity. Ex: If the input is 150 350, then output is: 200 3 4 int main() { 3.4.3: Working with branches. 5 int numItems; 6 7 8 9 10 11 12 13 14 15 16 17 18} Check int boxCapacity; cin>> numItems; cin>> boxCapacity; if (numItems 150 ){ boxCapacity boxCapacity 150; } cout << boxCapacity << endl; return 0; Next level 2 Feedback? An if statement checks if numitems is 150 or less using the expression numitems <= 150. If numitems is 150 or less, the branch executes and 150 is subtracted from boxCapacity. 1 2 D-D-
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply