Project 5

Convert string to float, scanf input, printf output (50 points)
Write a program which will accept a real number at the keyboard. One way to output the real number exactly the same way it was entered is to input the real number as a string. Your string should be declared so that up to 6 digits plus the decimal place will be accepted. Don't forget that you will have to allocate memory for the null character. In all, you must allocate enough memory for 8 characters. You must input using the scanf input function. Using the prinf function, output the string, and the real number rounded to the whole numbers, tenths, hundredths, and thousandths place. In order to round, you must use the atof function to convert the string to a double. The atof function is located in the stdlib header file. Your program must display the results as indicated below. Make sure you line up your columns like the output. Your code must be well documented. Also include your name, date, project number and a brief description of the program.
Sample output1

Please enter a float : 2.3459

                    Rounding Report
============================================================
Number    WholeNumber     Tenths     Hundredths    Thousands
2.3459         2            2.3         2.35         2.346
============================================================

Sample output2

Please enter a float : 15.994

                    Rounding Report
============================================================
Number    WholeNumber     Tenths     Hundredths    Thousands
15.994        16           16.0         15.99         15.994
============================================================


Sample output3

Please enter a float : 0.56234

                    Rounding Report
============================================================
Number    WholeNumber     Tenths     Hundredths    Thousands
0.56234         1            0.6         0.56         0.562
============================================================