0

What is the (%) concept in programming?

22nd Mar 2017, 2:00 PM
Fatihullah Noory
Fatihullah Noory - avatar
5 ответов
+ 6
% operator returns remainder obtained as a result of division. 5 % 2 = remainder obtained when 5 is divided by 2 = 1
22nd Mar 2017, 2:02 PM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 6
1%2 = 1 as 1 is 0 times 2 plus 1 (0*2+1).
22nd Mar 2017, 2:08 PM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
0
ok sir krishna
22nd Mar 2017, 2:06 PM
Fatihullah Noory
Fatihullah Noory - avatar
0
what 1%2=?
22nd Mar 2017, 2:07 PM
Fatihullah Noory
Fatihullah Noory - avatar
0
'%' is remainder or modules operator. It is different from '/' which is divide operator.
22nd Mar 2017, 2:16 PM
Rax
Rax - avatar