//write an algorithm for this program and optimize the
entire procedural function using c++ constructs
//Do not change the control structures used
//Make the program interactive(user friendly)
#include <iostream>
#include <ostream>
#include <cstdio>
#include <string>
Create a class or a struct called cheque , make a variable called const char * name , double currency , double dollar. That will be a start. Then create a friend method overload for the operator << of ofstream and called that method printCheque. Create another method that convert double value to currency and dollar called it addToAccount. This method will increment the dollar and currency. Then you can ask to the console what is your name then add amount and also output press ok to submit then in the main when you exit the loop you call the print method. That should do.