subject

Online book merchants offers premium customers 1 free book with every purchase of 5 or more books and offers 2 free books with every purchase of 8 or more books. it offers regular customers 1 free book with every purchase of 7 or more books, and offers 2 free books with every purchase of 12 or more books. write a statement that assigns freebooks the appropriate value based on the values of the bool variable ispremiumcustomer and the int variable nbookspurchased .i triedif (ispremiumcustomer==true){if (nbookspurchased > = 5){freebooks==1; {if (nbookspurchased > = 8){freebooks==2; else if (ispremiumcustomer==false){if (nbookspurchased > = 7){freebooks==1; {if (nbookspurchased > = 12){freebooks==2; but the system said: remarks: ? at executionproblems detected: ? the value of freebooks is incorrect. ? you did not assign a value to freebooksand this one a loop that reads strings from standard input where the string is either "duck" or "goose". the loop terminates when "goose" is read in. after the loop, your code should print out the number of "duck" strings that were read.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
What is the first step in creating a maintenance ?
Answers: 2
question
Computers and Technology, 23.06.2019 20:10
Leo is a recruitment executive for a large company. he has identified new labor resource requirements in both the marketing and production departments. what should be his first step in recruiting candidates for the positions? a. conduct background checks of candidates b. make job offers c. arrange interviews d. conduct reference checks e. place job ads on job sites
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
What is the process in which the software development team compiles information to determine the final product
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
In a heat transfer course, we can derive the equation for the temperature distribution in a flat rectangular plate. in this example, we will look at a plate at steadystate with three sides being held at t1, and one side held at t2. the temperature for any location on the plate, t(x,y), can be calculated by where create a function (prob3_5) that will take inputs of vectors x and y in feet, scalar n, scalars l and w in feet and scalars t1 and t2 in degrees fahrenheit. it will output a matrix t which is the temperature of each x and y locations. t will have the number of columns equal to the number of elements in x and rows equal to the number of elements in y. though this can be done without loops (perhaps more efficiently), your program must use a nested loop.
Answers: 2
You know the right answer?
Online book merchants offers premium customers 1 free book with every purchase of 5 or more books an...
Questions
question
Mathematics, 07.04.2020 17:26
question
Mathematics, 07.04.2020 17:26
Questions on the website: 13722360