next up previous
Next: If Statement Up: Arithmetic Operators Previous: Arithmetic Operators

Example




#include <iostream.h>

main( )
{
int x, y;
x=10;
y=3;
cout << x/y; // will display 3
cout<< "$\backslash$n";
cout<< x%y; // will display the remainder=1
return 0;
}


Yousef Haik
2/23/1998