Computer Science, asked by preetanjali5828, 9 months ago

What will be the value of variable r? var r = 45 % 7;

Answers

Answered by Anonymous
0

r = 45%7

r = 3.15

please mark as brainliest answer and follow me

Answered by shilpa85475
0

Value of r is 3 .

EXPLANATION:

  • Arithmetic operators are used to perform mathematical calculations like addition, subtraction, division etc. ‘%’ is called the ‘Modulus’ Arithmetic operators, abbreviated “mod”.
  • It will give the remainder after division.
  • Like 5%3 will be 2, which means 2 is the remainder when we divide 5 by 3.
  • The given expression to calculate the value of r=45%7.
  • We will divide 45 by 7 and answer will be 3 as remainder. (7*6=42 and then 45-42=3 as remainder).

Similar questions