In C++, When I calculate 2/3, it will output decimal values, how can I just get the original format (i.e.g 2/3) instead of 0.66666667
Thanks
#include using namespace std; int main() { int a,b,q,r; cin>>a>>b;//first number and second number q = a/b; r = a-q*b; cout<
I just got quotient by a/b then got the remainder by a-q*b. open for suggetions if any.