i have to write a program that takes input from the user and displays a simulated check we have to write the dollar amount in words and i cant figure out how to go about doing that. this is my code so far.
//*******************************************************
// Include Files
//*******************************************************
#include<iostream>
#include<iomanip>
#include<string>
#include<cstdlib>
using namespace std;
//**********************************************************
// Main line
//***********************************************************
int main()
{
string date;
string name;
double amount;
double nAmount=0.0;
cout << "Enter the date : ";
cin >> date;
cout << "Enter payee name : ";
cin.ignore();
getline(cin,name);
cout << "Enter the amount of the check : ";
cin >> amount;
while(amount>999.99 || amount <0)
{
cout << "Enter amunt greater than zero and less than $999.99 ";
cin >> amount;
}
cout << setprecision(2) << fixed;
}