C++ Arithmetic Operator remainder operator

Description

C++ Arithmetic Operator remainder operator

#include <iostream>
using namespace std;
int main()/*  w  w w  . j  av a2s.  c om*/
{
   cout <<  6 % 8 << endl    // 6
   <<  7 % 8 << endl    // 7
   <<  8 % 8 << endl    // 0
   <<  9 % 8 << endl    // 1
   << 10 % 8 << endl;   // 2
   return 0;
}



PreviousNext

Related