C++ examples for Operator:Arithmetic Operator
Demonstrate remainder operator
#include <iostream> using namespace std; int main()//from ww w . jav a 2 s . co m { cout << 6 % 8 << endl // 6 << 7 % 8 << endl // 7 << 8 % 8 << endl // 0 << 9 % 8 << endl // 1 << 10 % 8 << endl; // 2 return 0; }