Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can u fix my code please 44123 coco cola (334n1) $1.23 90321 Snickers $9.99 gak17 Albeni se.79 i3272 Mi-FI Router $243.79 51423 Nition DSLR $1599

can u fix my code please image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
44123 coco cola (334n1) $1.23 90321 Snickers $9.99 gak17 Albeni se.79 i3272 Mi-FI Router $243.79 51423 Nition DSLR $1599 51424 Nition Lens $999 73918 IG 32 LED TV $399.90 43903 kinder liveno 51.19 EkD 132221 73913 i 1234512 4A+241210 END 4123 Coca Colo (M3nal) $1.23 4124 Cosa cola (5aimi) $1,82 90321 Snickers 9asi7 Althen is ing 13222 - Bil-fi. Router \$243,79 Sile23 Nikon D5LR $1599 51424 mikon tens $999 73948 th 32 " teD IV 5799.90 in 4a1235 4a12i 6 gestit 1 gemi: 43909 : end 5E231 Pepsi (330n1) 51.Se casj2 Mark der $1.29 843 Thix 51. 10 62450 Connt Lens $399 54100 Ferrito hocher $1.45 Exio 562311 56231 51292 94586 i suler io yin 53 53 ) B My Mac Finished running 53 main main 53 ) 53 ) 6. main ) No Selection \#include \#include Ainclude \#ncluda ciomanip> using namespace std; void marketdatabase(vector q qrcodes, vector\& items, vector\& prices) 1 cout "Enter product QR, name, and price (enter 'END' to finish):" endl; while (true) 1 string line; getline(cin, line); if (ine == "END") 1 break; \} size_t qrPos = line.find(' '); size_t namePos =1 ine. find (, qrPos +1); size_t pricepos =1 ine.rfind ('s'); string priceSubstring =1 ine substr ( pricePos +1); string qrCode =1 ine. substr(, qrPos ); string itemName =1 ine substr (qrPos +1 , namePos - qrPos -1); double itemprice = stod(priceSubstring); // Extracting price direatiy after the name qrcodes - push_back(qrCode) : itens.push_back(itemName); prices , push_back(itemprice); \} \} int findercodeIndex (const vector\& qrcodes, const string\& qrcode) 1 if (qrcodes [i]= qrcode) \{ return static_cast(i); Uine: 110 Kinder 4$4.76 VAT(18K):$2.41 Total: $15.81 main 53) (inaln No Selection int findorcodeIndex(const vectorestrings 8 qcodes, const string\& qreode) f \} return -1 ; \} void shoppinglist(const vectorestring \& qrcodes, canst vector itens, canst vector\& prices) string line; vectorestring> shoppinglistkodlari; vector shoppinglistadetler; cout endi; cout "Enter shopping list item QR and quantity (enter END to finish):" endl; while (true) 1 getine(cin, 1ine); if (line = "END") 1 break; \} string arcode = line.substr (0, line. find ( ' ' ) ): Int index = findercodeIndex(qreodes, qreode); if (index =1)(1 cout "Iten QR " qrcode " not found in inventory. Please try again," endi; \} else f shoppinglistkodlari;push_back(qrcode); shoppinglistadetler, push_back(amount); \} \} double subtotal =0.; cout f fixed setprecision( 2 ) endl; for (size_t i=0;i shoppinglistkodlari; vector shoppinglistadetler; cout endi; cout "Enter shopping list item QR and quantity (enter END to finish):" endl; while (true) 1 getine(cin, 1ine); if (line = "END") 1 break; \} string arcode = line.substr (0, line. find ( ' ' ) ): Int index = findercodeIndex(qreodes, qreode); if (index =1)(1 cout "Iten QR " qrcode " not found in inventory. Please try again," endi; \} else f shoppinglistkodlari;push_back(qrcode); shoppinglistadetler, push_back(amount); \} \} double subtotal =0.; cout f fixed setprecision( 2 ) endl; for (size_t i=0;i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

10. What is meant by a feed rate?

Answered: 1 week ago