Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Correct the errors in the lines of code shown. The code variable has the char data type; the other variables have the int data type.

Correct the errors in the lines of code shown. The code variable has the char data type; the other variables have the int data type.

if (toupper(code) = 'x')

cout << "Discontinued" << endl;

else cout << "How many? ";

cin >> quantity; total = quantity * 10;

//end if With the next problem you must do the program, run it and if necessary debug it. Then submit the code and the running output.

Step by Step Solution

3.42 Rating (155 Votes )

There are 3 Steps involved in it

Step: 1

Given sentence The code variables has the ch... blur-text-image

Get Instant Access to Expert-Tailored 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

Document Format ( 2 attachments)

PDF file Icon
60939bc36f124_210732.pdf

180 KBs PDF File

Word file Icon
60939bc36f124_210732.docx

120 KBs Word File

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Microsoft Visual C# An Introduction to Object-Oriented Programming

Authors: Joyce Farrell

7th edition

978-1337102100

More Books

Students also viewed these Programming questions

Question

9.3 Evaluate methods used to treat eating disorders.

Answered: 1 week ago