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
babunello [35]
2 years ago
12

You are splitting up all your apples equally between 3 people. which statement below will calculate how many apples will be left

over ?
a. var leftOver = numApples / 3;


b. var leftOver = 3/ numApples;


c. var leftOver = numApples % 3



d. var leftOver = 3% numApples
Computers and Technology
1 answer:
yarga [219]2 years ago
7 0

Answer:

The correct answer is:

c. var leftOver = numApples % 3

Explanation:

JavaScript uses different operators to perform various mathematical functions. In mathematics, when a number is not completely divisible by other the answer contains the remainder and quotient.

Modulus operator is used in JavaScript to find the remainder.

For example,

20/3 will return the quotient which is 6 while

20%3 will return the remainder which is 2

In the given statement, we have to find the number of remaining apples after being divided into three people

So,

Number of apples mod 3 will give us the number of remaining apples.

Hence,

The correct answer is:

c. var leftOver = numApples % 3

You might be interested in
ppose we have a Rectangle class that includes length and width attributes, of type int, both set by the constructor. Define an e
vichka [17]

Answer:

Check the explanation

Explanation:

#include <bits/stdc++.h>

using namespace std;

class Rectangle{

  public:

      int length;

      int breadth;

      Rectangle(int l,int b){

          length = l;

          breadth = b;

      }

      int area(){

          return length*breadth;

      }

      int perimeter(){

          return 2*(length+breadth);

      }

      bool equals(Rectangle* r){

          // They have the exact same length and width.

          if (r->length == length && r->breadth == breadth)

              return true;

          // They have the same area

          if (r->area() == area())

              return true;

          // They have the same perimeter

          if (r->perimeter() == perimeter())

              return true;

          // They have the same shape-that is, they are similar.

          if (r->length/length == r->breadth/breadth)

              return true;

          return false;

      }

};

int main(){

  Rectangle *r_1 = new Rectangle(6,3);

  Rectangle *r_2 = new Rectangle(3,6);

  cout << r_1->equals(r_2) << endl;

  return 0;

}

8 0
3 years ago
Characteristics of first generation computers​
Marrrta [24]
* Main Electron a component- vacuum tube.

* Main memory- Magnetic drums and magnetic tapes.

* Programming language- Machine language.

* Power- Consume a lot of electricity and generate a lot of heat.

* were expensive to operate
5 0
2 years ago
Explain how to number text in a document​
uranmaximum [27]

Answer:

Lol

Explanation:

Yes iri

8 0
3 years ago
Read 2 more answers
Which statement compares the copy and cut commands?
ella [17]

Answer: duplicate

Explanation:

5 0
2 years ago
Read 2 more answers
One problem with using e-mail is that ______. a. It can be perceived as being too casual b. It is never appropriate for business
Free_Kalibri [48]
I personally feel that e-mail can be used for more business settings and as a more formal approach to things as opposed to a text, but option C seems to be more of an opinion.  I would go with C or D.
6 0
2 years ago
Other questions:
  • How often are computer and user policies applied after a user has logged into a computer?
    15·1 answer
  • Refer to the following code segment. You may assume that array arr1 contains elements arr1[0],arr[1],...,arr[N-1], where N = arr
    8·1 answer
  • What is the output of the code snippet given below?string s = "abcde";int i = 1;while (i &lt; 5){ cout &lt;&lt; s.substr (i, 1);
    11·1 answer
  • Explain what is meant by information technology (IT). Explain what is meant by information systems (IS). Why is it important to
    7·1 answer
  • Which of the following code is correct? I: print("Programming is fun") print("Python") print("Computer Science") II: print("Prog
    11·1 answer
  • You insert a comment in a worksheet by using a command on the ____ tab on the Ribbon.
    13·1 answer
  • Which type of password would be considered secure
    5·2 answers
  • 1)Create a conditional expression that evaluates to string "negative" if userVal is less than 0, and "positive" otherwise. Examp
    15·2 answers
  • What does the Finder do?
    5·1 answer
  • In additon to setting up services, what other tasks does a sysadmin have to keep in mind? check all that apply.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!