Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Ron has numLaptops laptops and numDesktops desktops read from input. Ron's number of laptops increases by 4 times. Ron removes 6 desktops. Write statements to
Ron has numLaptops laptops and numDesktops desktops read from input. Ron's number of laptops increases by 4 times. Ron removes 6 desktops. Write statements to update numLaptops and numDesktops. Then, assign the variable totalComputers with the total number of laptops and desktops. Ex: If the input is 89 , then the output is: 32 laptops 3 desktops 35 total int numLaptops; int numdesktops; int totolComputers: cin numLaptops; cin >> numbesktops; cout numlaptops "tuptops" endi; cout numbesktops " desktops" endl; cout totalComputers "total" endl; \}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started