Question: Can anyone help me with c++ programming? The direction is in the picture For this assignment you are to write a C++ program that will

Can anyone help me with c++ programming?
The direction is in the picture  Can anyone help me with c++ programming? The direction is in

For this assignment you are to write a C++ program that will read in UPC numbers and check them for correctness. The data includes numbers that are ok, two numbers that are wrong, and a number that is scanned backwards. data to be used for input upc 9-10679-87078-4 upc 7-93190-02004-9 upc 0-41100-33077-2 upc 0-76281-70322-0 upc 0-41270-87455-4 upc 0-41270-88000-8 upc 0-41163-41030-5 upc 0-44300-12392-9 upc 0-36000-28590-1 upc 8-00088-07214-0 sample output upc 9-10679-87078-4 ok upc 7-93190-02004-9 ok. upc 0-41100-33077-2 ok. upc 0-76281-70322-0 ok upc 0-41270-87455-4 error upc 0-41270-88000-8 ok upc 0-41163-41030-5 ok upc 0-44300-12392-9 error upc 0-36000-28590-1 ok upc 8-00088-07214-0 ok backwards Some Logic you may want to use: total e multiplier 3 loop 20 times incrementing i by 1 pick off the i'th character if the character is a digit then convert the character to a number total total number multiplier change the multiplier end loop if the total is a multiple of ten then write "ok else do the same check as above but go through the loop backwards if the total is a multiple of ten then write 'ok backwards else write 'error

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!