Here is a great web site I found a while back that have all the basic references that I have needed. It includes a lot of useful info. I hope everyone finds it just as useful.
http://www.cppreference.com/ -Valnir ----- Original Message ----- From: "Michael Barton" <[EMAIL PROTECTED]> To: "Matthew Kerwin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: <[email protected]> Sent: Wednesday, February 11, 2004 3:13 AM Subject: Re: FLoats > > >Greetings, > > > How do I get a float that if the answer is a whole number to not > > >print .0 at the end of it. > > > > > >Example if the result is 4.5 print 4.5 but if the result is 4.0 print 4 > > The %g format option to *printf is what you are looking for. > > printf("%g\n", 4.5); > printf("%g\n", 4.0); > > [EMAIL PROTECTED] red]$ ./test > 4.5 > 4 > > > Does anyone have a list of refernces for basic C programming? In > > particular some that deal with the very cool but very basic tools > > such as printf ? I don't, off the top of my head. > > man pages are your friends ;) > > --Palrich. > > > -- > ROM mailing list > [email protected] > http://www.rom.org/cgi-bin/mailman/listinfo/rom >

