Consider the code given below:
A = 100
B = 80
C = 0
C = A + B
print (C)
C %= A
print (C)
a) What operator is used in the line number 6?
b) What will be final value of C?
Answers
Answered by
1
Answer:
c... ...... .....maybee
...
.
.
.
.
.
.
Answered by
0
Answer:
A) In line 6, which operator is used?
In line 6, the modulo operator is used.
B) What will be final value of C?
C's final value will be 80.
Explanation:
- The modulo operator, represented by the symbol %, is an arithmetic operator.
- The modulo division operator returns the remainder of an integer division. When x is divided by y, the remainder is produced.
- The modulus operator is a new addition to C's arithmetic operators, and it works between two operands.
- It computes the result by dividing the given numerator by the denominator.
- In other words, it generates a remainder for integer division. As a result, the remainder is always an integer number.
#SPJ5
Similar questions