0
Sololearn - Countdown Project C++
N % 5 == 0 Can someone explain to me how this formula can determine the variables can multiple to 5? Thanks
3 Antworten
+ 1
U know in mathematics how we finding multiple check all multiple of 5 it will completely divisible by 5 means if u divide any number which us divisible by 5 completely it will give remainder zero . And here
N%5 = Remainder
0
The purpose of the == 0 is to validate if the N do not have a remainder?
0
Here use of Modulous Operatior which gives the result remainder, and if any number is divided by a number and it gives remainder zero means it is divisible by that number