Question: 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
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 then the output is:
import java.util.Scanner;
public class RemainingFlowers
public static void mainString args
Scanner scnr new ScannerSystemin;
int totalFlowers;
int numFlowers;
int remainingFlowers;
totalFlowers scnrnextInt;
numFlowers scnrnextInt;
Your code goes here
System.out.printlnRemaining flowers: remainingFlowers;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
