#include <iostream> //used for cout and cin statements.
#include <string> //used for potential strings
#include <iomanip> //used for potential manipulation of data outcomes
#include <fstream> //needed for saving data file
usingnamespace std;
//function prototype
int FracPart(float n); // float n is just a local variable in this function
int WholePart(int x); // int x is just a local variable in this function.
// when you exit function it is destroyed with it local variables
int x; // not needed
int main()
{
float n;
cout<< "Please enter a mixed number with six or more decimal places. \n ";
cin>> n;
cout<<n<<" is the decimal number you have entered. \n";
cout<<FracPart(n); // just add << endl; or << "\n"
cout<<"\n"; // then you can delete this.
cout<<WholePart(x); // required original input
cout<<"]n";
}
int FracPart(float n) // this need to be rewritten
{
int x;
x=(n*(10*10*10*10*10*10))+(0.5);
return x;
}
int WholePart(int x)
{
return x;
}