From the documentation on scanf
Return value
###Return value IfIf successful, the total number of characters written is returned, otherwise a negative number is returned.
Try
if (scanf("a=%lf , b=%lf , c=%lf",&a,&b,&c)==3) You must include empty spaces in the string scanf takes as an argument, specifying the format.