the programs needs toCode:#include<iostream> #include<string> using namespace std; int main() { string productID; char reply = 'y'; do { cout << "Enter The Product ID: "; cin >> productID; if (productID.length()==5) cout << "Would You Like To Enter Another Product ID [Y/N] ? "; cin >> reply; }while (reply == 'y' || reply == 'Y'); return 0; }
1. allow user to enter a product id,
2.the product id needs to be only 5 digits long
3.the first 2 numbers of the product id need to be 14 or 15
4. the price for product ids beginning with 14 is 10$
the price for product ids beginning with 15 is 15$
5.all other product ids should display a " invalid Id " message
how can i code this using string manipulation?