157k views
2 votes
C++ Integer variables totalFlowers and numFlowers are read from input. A bouquet consists of numFlowers flowers, and the number of flowers is given by totalFlowers. Assign remainingFlowers with the remaining flowers after making as many bouquets as possible.

Ex: If the input is 13 4, then the output is: Remaining flowers: 1

1 Answer

5 votes

Answer:

To assign remainingFlowers with the remaining flowers after making as many bouquets as possible, you can use the following code:

remainingFlowers = numFlowers - totalFlowers;

Step-by-step explanation:

User Mekajiki
by
8.0k points