Respuesta :

ijeggs

Answer:

import java.util.Scanner;

public class TestClock {

   public static void main(String[] args) {

   Scanner in = new Scanner(System.in);

       System.out.println("Enter number of prices");

       int numberOfPrizes = in.nextInt();

       System.out.println("Enter number of participants");

       int numberOfParticipants = in.nextInt();

        boolean isDivisible;

        if(numberOfPrizes%numberOfParticipants==0){

            isDivisible=true;

            System.out.println("True");

        }

        else {

            isDivisible=false;

            System.out.println("False");

        }

   }

}

Explanation:

Using Java Language;

  1. Prompt user to enter the number of prices and number of participants using the scanner class
  2. receive and save values in the variables numberOfPrizes and numberOfParticipants
  3. Create  a boolean variable (isDivisible)
  4. Using if statement and the modulo operator (%) which returns the remainder of division check if numberOfPrizes divieds evenly by numberOfParticipants.