C++ Programming Statement: You are assigned a new space mission, where you have to destroy certain galaxies ruled by Luxtoro and Turtoro (random villains). The galaxies consist of D and H number of...


C++ Programming Statement:<br>You are assigned a new space mission, where you have to destroy certain galaxies ruled<br>by Luxtoro and Turtoro (random villains). The galaxies consist of D and H number of<br>planets and you are provided with only two special weapons:<br>One destroys exactly one planet from both the galaxies simultaneously.<br>The other cuts in half each planet from one galaxy of your choice and in effect<br>doubles the number of planets.<br>You have to develop code to find whether it's possible to destroy both the galaxies and<br>print the minimum number of gun firings required as the output.<br>Sample Input:<br>1<br>26<br>Sample Output:<br>8<br>

Extracted text: C++ Programming Statement: You are assigned a new space mission, where you have to destroy certain galaxies ruled by Luxtoro and Turtoro (random villains). The galaxies consist of D and H number of planets and you are provided with only two special weapons: One destroys exactly one planet from both the galaxies simultaneously. The other cuts in half each planet from one galaxy of your choice and in effect doubles the number of planets. You have to develop code to find whether it's possible to destroy both the galaxies and print the minimum number of gun firings required as the output. Sample Input: 1 26 Sample Output: 8

Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here