Adding 2 difft int to form a number

got 1 problem..
can someone help me wit the logic?

Money Money ::operator+(const Money &rhs)const
{

Money temp;

temp.a = a+rhs.a;
temp.b = b+rhs.b;

return temp;

}//end

i got 2 number e.g 6.2 and 3.8
6 is int a
2 is int b

3 is int a
8 is int b

how can i add them up so that they become 10?

anyone can help?

In this case too sscanf() can be used to parse the floating point numbers and after that add the two numbers on the rhs of the decimal point to get 10.