(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 the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with brilliantassignmenthelp.com
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat
Close

Sometimes it is hard to do all the work on your own

Let us help you get a good grade on your paper. Get professional help and free up your time for more important courses. Let us handle your;

  • Dissertations and Thesis
  • Essays
  • All Assignments

  • Research papers
  • Terms Papers
  • Online Classes