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, 21.06.2019 19:40
Consider the following generator matrix: g= (1 0 0 0 1 0 0 0 1 1 1 1 1 0 1 1 1 0) find all the codewords generated by this generator matrix. determine the number of errors that this code will detect. determine the number of errors that this code will correct. prove that a linear code's minimum weight is equivalent to its minimum distance. that is, where c is a linear code, dist(c) = wh(c)
Answers: 1
question
Computers and Technology, 22.06.2019 05:30
Agood flowchart alludes to both the inputs and outputs you will need to receive and give to the user. true or false?
Answers: 3
question
Computers and Technology, 22.06.2019 22:40
When you type the pwd command, you notice that your current location on the linux filesystem is the /usr/local directory. answer the following questions, assuming that your current directory is /usr/local for each question. a. which command could you use to change to the /usr directory using an absolute pathname? b. which command could you use to change to the /usr directory using a relative pathname? c. which command could you use to change to the /usr/local/share/info directory using an absolute pathname? d. which command could you use to change to the /usr/local/share/info directory using a relative pathname? e. which command could you use to change to the /etc directory using an absolute pathname? f. which command could you use to change to the /etc directory using a relative pathname?
Answers: 3
question
Computers and Technology, 23.06.2019 18:00
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
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, 08.03.2021 06:20
question
Mathematics, 08.03.2021 06:20
question
History, 08.03.2021 06:20
Questions on the website: 13722361