int main ( void ) { char str[25]; double num; int sig = 5; /* significant digits */ /* a regular number */ num = 9.876; gcvt ( num, sig, str ); printf ( "string = %s\n", str ); /* a negative number */ num = -123.4567; gcvt ( num, sig, str ); printf ( "string = %s\n", str ); /* scientific notation */ num = 0.678e5; gcvt ( num, sig, str ); printf ( "string = %s\n", str ); return ( 0 ); }