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
Snezhnost [94]
3 years ago
12

Return true if the given non-negative number is a multiple of 3 or 5, but not both. Use the % "mod" operator.

Computers and Technology
1 answer:
Pani-rosa [81]3 years ago
4 0

the following C++ function will return true if the given non - negative number is multiple of 5 or 3 else it will return false.

bool function( int x ){

// variable to check if it is multiple of both or not

int number =0;

if(3%x == 0){

number++;

}

if(5%x == 0){

number++;

}

// Now returning by deciding

if( number <=1)

return true;

else

return false

}

You might be interested in
Gunther is filling in his own input mask. He wants to format the Social Security numbers of his clients. The field must contain
kati45 [8]
Last one I am not sure they
4 0
2 years ago
You have a new phone. What determines what type of messages you can send?
prohojiy [21]
B the services provided by the provider
6 0
2 years ago
A corporate or government network that uses Internet tools, such as Web browsers, and
Alchen [17]

Answer: Intranet

Explanation:

The options include:

A. extranet.

B) social network.

C) intranet.

D) e-market.

A corporate or government network that uses Internet tools, such as Web browsers, and Internet protocols is referred to as intranet.

Social networks are social media sites that are used by people which allows them to stay connected with one another.

E-market is a form of marketing whereby goods and services are promoted or advertised through the use of the internet.

Therefore, the answer to he above question is intranet.

3 0
3 years ago
(1) Experiment Purpose
ra1l [238]

An Output report is known to be the various  findings that has been generated or it is said to be the result of a given program outcome.

<h3>What is an output report?</h3>

An output is known to be a file that has been produced by the system when a user is said to have submitted a Program, Report Set, etc. for execution.

Note that to be able to compile the GPSSWorld program, one has to use a statistical software to create the output and charts, and then one can copy and paste the results unto any given  word processor software where one can construct a table for it.

Learn more about output reports from

brainly.com/question/11599232

#SPJ1

3 0
1 year ago
The ArrayList class contains a trim method that resizes the internal array to exactly the capacity. The trim method is intended
andreev551 [17]

Answer:

public void trimToSize() {

modCount++;

if (size < elementData.length) {

elementData = (size == 0)

? EMPTY_ELEMENTDATA

: Arrays.copyOf(elementData, size);

}

}

Now, the running time for copyOf() function is O(N) where N is the size/capacity of the ArrayList. Hence, the time complexity of trimToSize() function is O(N).

Hence, the running time of building an N-item ArrayList is O(N^2).

Please find the sample code below.

CODE

==================

import java.util.ArrayList;

public class Driver {

  public static void main(String[] args) throws Exception{

      int N = 100000;

      ArrayList<Integer> arr = new ArrayList<>(N);

     

      long startTime = System.currentTimeMillis();

      for(int i=0; i<N; i++) {

          arr.add(i);

          arr.trimToSize();

      }

      long endTime = System.currentTimeMillis();

      double time = (endTime - startTime)/1000;

      System.out.println("Total time taken = " + time + " seconds.");

  }

}

Explanation:

5 0
3 years ago
Other questions:
  • What can you do to make sure you have a healthy credit report
    13·2 answers
  • Some cases have ____, also called spacers, which are round plastic or metal pegs that separate the motherboard from the case, so
    9·1 answer
  • The scheme function (mult2-diff Ist) should take one argument, a list of numbers, and results in multiplying each number in the
    11·1 answer
  • Add a new row to a table by clicking in the
    10·1 answer
  • Can I change my username?
    6·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    5·1 answer
  • Describe 2 health risks posed by computers
    8·1 answer
  • 14. Which of the following information about the ESRT T-teen rating rating is FALSE?
    15·1 answer
  • Which group scope can be used to assign permissions to resources only in the domain in which the group is created
    12·1 answer
  • Types of Hazards Mitigation Measures
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!