subject

If necessary, create a new project named intermediate23 project and save it in the
cpp8\chap13 folder. also create a new source file named intermediate23.cpp. write
a program that displays the color of the item whose item number is entered by the
user. all item numbers contain exactly seven characters. all items are available in four
colors: blue, green, red, and white. the fourth character in the item number indicates
the item’s color, as follows: a b or b indicates blue, a g or g indicates green, an r or r
indicates red, and a w or w indicates white. if the item number does not contain
exactly seven characters, or if the fourth character is not one of the valid color
characters, the program should display an appropriate message. use a sentinel value to
end the program. save and then run the program. test the program using the following
item numbers: 123b567, 34ag123, 111r222, 111w222, 123, 1234567, and 111k456.

use the len() and substring methods (and of course there are others) to perform the necessary work.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:00
Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive. after the loop terminates, it prints out, on a line by itself and separated by spaces, the sum of all the even integers read, the sum of all the odd integers read, a count of the number of even integers read, and a count of the number of odd integers read, all separated by at least one space. declare any variables that are needed. assume the availability of a variable, stdin, that references a scanner object associated with standard input. that is, stdin = new scanner(system.in); is given.
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
The "instance" relationship shows that something is an object of a
Answers: 1
question
Computers and Technology, 23.06.2019 01:20
Write a function balancechemical to balance chemical reactions by solving a linear set of equations. the inputs arguments are: reagents: symbols of reagents in string row array products: symbols of products in string row array elements: elements in the reaction in string row array elcmpreag: elemental composition of reactants in two dimensional numeric array elcmpprdcts: elemental composition of prducts in two dimensional numeric array hint: the first part of the problem is setting up the set of linear equations that should be solve. the second part of the problem is to find the integers from the solution. one way to do this is to mulitiply the rational basis for the nullspace by increasing larger integers until both the left-and right-side integers exist. for example, for the reaction that involves reacting with to produce and : reagents=["ch4", "o2"]; products =["co2", "h2o"]; elements =["c","h", "o"] elcmpreag=[1,4,0;
Answers: 3
question
Computers and Technology, 23.06.2019 04:20
4. a1. vince owns a television repair shop that is insured undera commercial package policy. the policy includes thebuilding and personal property coverage form and thecauses-of-loss broad form. the declarations page indicatesthat coverage applies to both the building and the namedinsured's business property. explain whether or not thefollowing losses would be covered under his policy.a. a fire occurs on the premises, and the building isbadly damaged.b. a burglar steals some money and securities from anunlocked safe.c. a business computer is damaged by vandals whobreak into the shop after business hours.d. a tornado touches down near the store. several tel-evision sets of customers in the shop for repair aredamaged in the storm.til
Answers: 2
You know the right answer?
If necessary, create a new project named intermediate23 project and save it in the
cpp8\chap13...
Questions
question
Physics, 15.09.2021 09:00
question
History, 15.09.2021 09:00
question
Mathematics, 15.09.2021 09:00
question
Chemistry, 15.09.2021 09:00
question
History, 15.09.2021 09:00
question
Mathematics, 15.09.2021 09:00
Questions on the website: 13722359