When I use the modulo (%) in C++ and write something like this:
int Mod = 18 % 8;
cout << Mod;
I get the output: 2
The whole answer would be 2.25 and the modulo prints out the remainder. I want it to say 25 instead of 2, but it only shows one remainder. How do I make it print more than one integer in the remainder if there is more?
int Mod = 18 % 8;
cout << Mod;
I get the output: 2
The whole answer would be 2.25 and the modulo prints out the remainder. I want it to say 25 instead of 2, but it only shows one remainder. How do I make it print more than one integer in the remainder if there is more?