Answer: Output if the number of jobs per painting job is 18.
Ans: The painting job of 18 quarts requires 4 gallons and 2 quarts of paint.
Step-by-step explanation:
import java.util.*;
public class QuartsToGallons {
public static void main(String[] args) {
//Fixed number of quarts
final int numberOfQuarts= 4;
//declare the number of jobs
int numberOfJobs;
//create a scanner
Scanner inObj= new Scanner(System.in);
System.out.println("Enter the number of paint in quarts for the painting job");
//Declare scanner object as number of jobs
numberOfJobs= inObj.nextInt();
//declaring the number of gallons
int numOfGallons = numberOfJobs / numberOfQuarts;
// declare quarts
int numOfQuarts= numberOfJobs % numberOfQuarts;
System.out.println("The painting job of "+ numberOfJobs+ " quarts requires "+ numOfGallons + " gallons and "+ numOfQuarts+ " quarts of paint.");
}
}