unsigned int num1 = 123; unsigned short num2 = 23; double res = (double) num1/num2; s.Format("%.6f", res);