added decimal to fraction in C++