Minggu, Juni 29, 2014

Example For Using Of Modulus On C Programming Language

Modulus is remainder of division:
  • 6:3 = 2 and have remainder 0, then 6 modulus 3 = 0
  • 5:2 = 2 and have remainder 1, then 5 modulus 2 = 1
  • 11:4 = 2 and have remainder 3, then 11 modulus 4 = 3

Example of using of modulus operator on C programming syntax:

main()
{
  printf("%d", 11 % 4);
  getch();
}

0 komentar: