Subj : Re: sprintf() problem ? To : borland.public.cpp.borlandcpp From : " Bruce Salzman" Date : Thu Jul 10 2003 03:13 pm "Olivier" wrote in message news:3f0d92ff@newsgroups.borland.com... > I'm working with double variable, i use the following function " > sprintf(tmp,"Total=%18.2f",x+y+z-a+(h+i)); " and sometimes the result is > 1.538980871324389050000000000000000000000e+120 if the correct result is > 237200. You should use "%lf" for a double and "%f" for a float variable. Regards, Bruce .