subject

Write a program that first gets a list of integers from input. the input begins with an integer indicating the number of integers that follow then, get the last value from the input, which indicates a threshold. output all integers less than or equal to that last threshold value. assume that the list will always contain less than 20 integers. ex: if the input is 5 50 60 140 200 75 100 the output is 50 60 75 the 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. the 100 indicates that the program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75. for coding simplicity, follow every output value by a space, including the last one. such functionality is common on sites like amazon, where a user can filter results.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 13:30
Question 1(multiple choice worth 5 points) (06.04 mc) how are the respiratory and circulatory systems similar? both systems provide glucose and other substances to cells. both systems regulate blood flow throughout the body. both systems remove carbon dioxide from the body. both systems send messages to the nervous system for breathing. question 2(multiple choice worth 5 points) (06.04 lc) the respiratory system controls and the circulatory systems controls antibodies; digestion breathing; blood flow muscles; bones nerves; senses question 3(multiple choice worth 5 points) (06.04 hc) read the following summary, which describes a body process. then, answer the question. blood enters the right side of the heart and travels to the lungs. there, the lungs eliminate carbon dioxide and exchange it for more oxygen. the oxygen-rich blood enters the left side of the heart. then, arteries carry blood away from the heart. what process is being described? circulation excretion immune response respiration question 4(multiple choice worth 5 points) (06.04 lc) the system is responsible for moving blood cells throughout the body. circulatory endocrine immune respiratory question 5(multiple choice worth 5 points) (06.04 mc) which of the following functions as part of the excretory and respiratory systems? blood heart intestines lungs
Answers: 1
question
Computers and Technology, 22.06.2019 10:40
Program using c++ only on visual studio pig is a simple two player dice game, played with one die. the first player to reach or surpass 50 is the winner. each player takes a turn rolling the dice. they add to the pot with each roll, having to decide to roll again and increase the pot, or cash out. the risk being they could lose the amount they’ve accumulated into the pot. the rules for each player’s die roll. 1. roll the dice. a. if user rolled a 1, i. the pot gets set to zero ii. the other player goes to step 1. b. a roll of 2-6 is added to the pot. 2. user can choose to hold or roll again. a. choice roll. return to step 1. b. choice hold. i. increment player score by the pot amount. ii. pot gets set to 0. iii. second player gets to roll and goes to step 1. program requirements: ● before each opponent begins ○ output the score for the person and the computer. ○ output the opponents whose turn is beginning and ask the user to hit enter to continue. ● with each dice roll. ○ output the die value, and amount of the round pot. ○ if it’s the users roll ask if they want to roll again ( r ) or hold ( h ). your program should allow r, r, h or h as valid input. if input is anything else, ask the user again until valid input is obtained. ○ the ai will continue playing until the round pot is 20 or more. ● once a player’s score is greater or equal to 50 then they have won, it will no longer ask if they want to keep rolling the die or not. ● once there is a winner ○ score totals are output along with who the winner was. user or computer ○ player is asked if they want to play again y or n. valid input should be y, y, or n, n. ● when a new game starts the starting roll goes to the player that did not roll last. if the user rolled last in the previous game, then the computer rolls first and vice versa. when the program first begins, the player will make the first roll of the first game. development notes : ● you will need a way to roll dice in your program. the rand() function works well, but returns an integer. if we want numbers 0 – 9 we can get the value modulus 10. ● call srand() with a value to seed it. it’s common to seed it with the current computer clock, include ctime, and then call srand(time(
Answers: 1
question
Computers and Technology, 23.06.2019 07:50
Apython programming question: assume s is a string of lower case characters. write a program that prints the number of times the string 'bob' occurs in s. for example, if s = 'azcbobobegghakl', then your program should print number of times bob occurs is: 2
Answers: 3
question
Computers and Technology, 23.06.2019 21:00
Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from greatest to least?
Answers: 1
You know the right answer?
Write a program that first gets a list of integers from input. the input begins with an integer indi...
Questions
question
Mathematics, 12.02.2021 18:30
question
Mathematics, 12.02.2021 18:30
question
Mathematics, 12.02.2021 18:30
Questions on the website: 13722361