Question: Hi , I need help, please. In Java. Here are the assignment instructions: The modulo operator ( % ) evaluates the remainder of the division
Hi I need help, please. In Java.
Here are the assignment instructions:
Themodulo operator evaluates the remainder of the division of two integer operands. Ex: is
Write a program that uses the modulo operator. The program will accept user input for the total number of flowers available to create a bouquet and the number of flowers each bouquet will contain. The program will then calculate how many bouquets can be created and how many flowers will be left over.
Example input the program should prompt the user to input the below values these are example values only
Ex: If the input is:
Enter total flowers available as an integer:
Enter the number of flowers for your bouquet as an integer:
Corresponding output:
There will be bouquets.
There will be remaining flowers.
Here is what I have:
import java.util.Scanner;
import java.util.;
public class IntDivModulo
public static int modCalculation
int mod ;
mod flowers bouquets;
return mod;
public static void mainString args
Scanner myScan new ScannerSystemin;
int flowers, bouquets ;
System.out.println Enter total flowers available as an integer: ;
flowers myScan.nextInt;
System.out.println Enter the number of flowers needed per bouquet as an integer: ;
bouquets myScan.nextInt;
Print out statements
System.out.println There will be flowers flowers.";
System.out.println There will be bouquets bouquets.";
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
