division

Im not clear on division and the remainder %.

Am i suppose to use both the / sign ( to get the main division between two numbers) and then the % sign ( to get the remainder from the answer from the division)in a single division problem to get the remainder?

or else

am i suppose to replace the / sign with the %

this is a little bit confusing?

thank you

• : Im not clear on division and the remainder %.
:
: Am i suppose to use both the / sign ( to get the main division between two numbers) and then the % sign ( to get the remainder from the answer from the division)in a single division problem to get the remainder?
:
: or else
:
: am i suppose to replace the / sign with the %
:
: this is a little bit confusing?
:
: thank you
:
[purple]
no, they are seperate operators. if u need the remainder, use only % and when u need division, simply use /.[code]
int x = 46, y = 13;
cout << "x%y = " << x%y << endl;
cout << "x/y = " << x/y << endl;
[/code]
see what happens when u run the above code. :-)
[/purple]
[hr][purple]~Donotalo()[/purple]

• ok, thanks for clearing that up.