Question: 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
Get step-by-step solutions from verified subject matter experts
