(IN C++)A special tax regulati

(IN C++)A special tax regulation allows an employee to set asideearnings to pay for qualified medical expenses and other items.  At LocalPharm, a privately owned pharmacy, codes are assigned toeach product If the code starts with an ‘C’, ‘D’, or ‘H’, the itemis eligible for reimbursement. Otherwise, the product is not.Write a program that inputs the records contained within a filelisting LocalPharm’s inventory. Each record contains an inventorycode, an item description, and a cost. Your program should output alist of all inventory items. For items that are eligible forreimbursement, the term “Qualified Expense” should appear next tothe item in your output.A sample input file might look like this:A1010 Strawberry Shampoo 7.99 C3940 Liquid Vitamins 10.12 C9304Diaper Rash Cream 6.58 C9854 Cleansing Wipes 4.15 D2901 NutritionalChocolate Shake 8.00 F3743 Flashlight 6.21 F4484 Dryer Clothes 4.20G3384 Smile Toothpaste 3.93 H1192 Bath Bench 51.53 H2324 BloodPressure Monitor 34.61 Z3445 Rejuvenating Serum 19.74

Answer:

Note: Could you plz go through this code and let me know if uneed any changes in this.Thank You=================================

// pharmacyProds.txt (Input file)

A1010 Strawberry Shampoo 7.99C3940 Liquid Vitamins 10.12C9304 Diaper Rash Cream 6.58C9854 Cleansing Wipes 4.15D2901 Nutritional Chocolate Shake 8.00F3743 Flashlight 6.21F4484 Dryer Clothes 4.20G3384 Smile Toothpaste 3.93H1192 Bath Bench 51.53H2324 Blood Pressure Monitor 34.61Z3445 Rejuvenating Serum 19.74

==============================

#include <fstream>#include <iostream>#include <iomanip>#include <cstring>#include <cstdlib>

using namespace std;

int findSeperatorIndex(string str);int main() {//Declaring variablesifstream dataIn;string code;int index;string name;double price;string str;dataIn.open(“pharmacyProds.txt”);//checking whether the file name is valid or notif(dataIn.fail()){cout<<“* File Not Found *”;return 1;}else{//Reading the data from the filewhile(getline(dataIn,str)){index=str.find(” “);code=str.substr(0,index);str=str.substr(index+1,str.length()-1);if(str.at(0)==’C’ || str.at(0)==’D’ || str.at(0)==’H’){cout<<code<<” “<<str<<” — QualifiedExpense”<<endl;}else{cout<<code<<” “<<str<<endl;}  }dataIn.close();}

  return 0;}

==================================

Output:

PLEASELIKE MY ANSWER


 
"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"

Calculate your order
Pages (275 words)
Standard price: $0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back
If you're confident that a writer didn't follow your order details, ask for a refund.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Power up Your Academic Success with the
Team of Professionals. We’ve Got Your Back.
Power up Your Study Success with Experts We’ve Got Your Back.