1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ivanzaharov [21]
3 years ago
8

Write an expression that evaluates to true if the value of the int variable numberOfPrizes is divisible (with no remainder) by t

he int variable numberOfParticipants. Assume that numberOfParticipants is not zero.
Computers and Technology
1 answer:
Elodia [21]3 years ago
6 0

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.
You might be interested in
While running a full system scan using your anti-malware software, three files have been identified as possible problems. You wa
Maksim231197 [3]

Answer: Quarentine the files

Explanation:

Hi, when an possible infected file is in quarantine, it means that is deleted from its original location and instead is putted in other location where it cannot longer affect the system. If there was a virus in the file, it is no harmless.

You can decide later if you want to delete it permanently or if not.

4 0
4 years ago
Which statement best describes the purpose of the Insert Function dialog box?
ryzh [129]

Answer:

It is used to insert a specific function by selecting it from the Insert Function list.

Explanation:

The insert function list various functions, and we can insert a specific function through a selection of one of the options from the insert function list. And it is certainly not used to display the information according to arguments used in the function, and which is quite clear. Also, it is used to put each type of excel functions in a certain order. And it is also not used to search for any specific functions through any keyword and description. Hence, the correct option is the second option.

3 0
4 years ago
The purpose of hazard lights is to
VladimirAG [237]

Hello. My name is Zalgo and I am here to be of assistance with your problem. The answer to the question is B. The purpose of hazard lights are to warn other drivers to watch out and drive past you safely. They are not supposed to be used an excuse for when you decide to do illegal or dangerous parking.

Hope this helps.

"Stay Brainly and stay proud!" - Zalgo

(By the way, do you mind marking me as Brainliest? I'd greatly appreciate it. Thanks)

7 0
3 years ago
Read 2 more answers
Which two keys are commonly used to move or insert data?.
vlabodo [156]

Answer:

control and shift

Explanation:

6 0
3 years ago
Write a recipe that stores the sum of the numbers 12 and 33 in a variable named sum. Have your recipe display the value stored i
VARVARA [1.3K]

Answer:

#include<iostream>

using namespace std;

int main(){

   int sum = 12+33;

   cout<<"The sum is: "<<sum<<endl;

}

Explanation:

First include the library iostream in c++ program for input/output.

Then, create the main function and declare the variable sum as integer type and store the sum of two given values.

After that, display the result store in the sum variable on the screen by using the instruction cout.

8 0
3 years ago
Other questions:
  • Which of the following careers is part of the Printing Technology pathway?
    10·1 answer
  • Design a BCD-to-Gray code decoder. Your decoder will have 4 inputs: A, B, C and D, representing a 4-bit BCD code (A being the MS
    7·2 answers
  • All phones must have a way of making and then terminating a connection to the phone network; however the exact procedure for doi
    12·1 answer
  • Before using large downloaded files that are in a compressed format, it is necessary to_____ them. A) Copy B) Extract C) Open D)
    9·1 answer
  • When was kale discovered?
    9·1 answer
  • What trends do you see in the industry in 2010? For example, if there were more or fewer jobs created by travel and tourism, rep
    9·2 answers
  • 3.
    5·1 answer
  • Java uses a right brace to mark the end of all compound statements. What are the arguments for and against this design?
    8·1 answer
  • What is a spark line? how is a different a chart​
    14·1 answer
  • Your development server is experiencing heavy load conditions. Upon investigating, you discover a single program using PID 9563
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!