subject
Computers and Technology, 24.12.2020 03:00 spearjj

Write a C++ program that tests whether the array has four consecutive numbers with the same values. bool isConsecutive(int values[], int size) In the main() program you should prompt the user to enter a series of integers and display if the series contains four consecutive numbers with the same value. Your program should first prompt the user for the number of integers in the list or number of values in the series. Assume the maximum array size is 20. No global variables may be used Use a function prototype for said function The function can not do any cin or cout The main() function will do all the cin and cout You may assume the list contains positive integers only Sample runs (bolded text is output) : Enter the number of values: 6 Enter a value: 3 Enter a value: 4 Enter a value: 5 Enter a value: 5 Enter a value: 5 Enter a value: 5 The list has consecutive four numbers! Enter the number of values: 9 Enter a value: 3 Enter a value: 4 Enter a value: 5 Enter a value: 50 Enter a value: 5 Enter a value: 6 Enter a value: 5 Enter a value: 5 Enter a value: 6 The list has no consecutive fours numbers!

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:20
This problem has been solved! see the answeran evil king has a cellar containing n bottles of expensive wine, and his guards have just caught a spy trying to poison the king’s wine. fortunately, the guards caught the spy after he succeeded in poisoning only one bottle. unfortunately, they don’t know which one. to make matters worse, the poison the spy used was very deadly; just one drop diluted even a billion to one will still kill someone. even so, the poison works slowly; it takes a full month for the person to die. design a scheme that allows the evil king to determine exactly which one of his wine bottles was poisoned in just one month’s time while expending at most o(logn) of his taste testers.you are not allowed to use n testers, one for each bottle, and see which one tester dies after 30 days.(no pseudocode needed. just answer in words, how many testers you use, how you use them and why you correctly identify the poisoned bottle in 30 days)
Answers: 2
question
Computers and Technology, 22.06.2019 08:00
What is the first step in creating a maintenance ?
Answers: 2
question
Computers and Technology, 22.06.2019 14:40
You are working with a professional edition organization. they wish to install the expense tracker which requires the use of 4 custom tabs, 3 custom objects, and one custom app. if the company is already using 4 applications, 36 custom objects, and 7 custom tabs, what will happen when they try to install expense tracker?
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
Write pseudocode to represent the logic of a program that allows the user to enter a value. the program multiplies the value by 10 and outputs the result.
Answers: 1
You know the right answer?
Write a C++ program that tests whether the array has four consecutive numbers with the same values....
Questions
question
English, 28.01.2021 01:00
question
Mathematics, 28.01.2021 01:00
question
Mathematics, 28.01.2021 01:00
question
Biology, 28.01.2021 01:00
question
Mathematics, 28.01.2021 01:00
question
Mathematics, 28.01.2021 01:00
question
History, 28.01.2021 01:00
question
History, 28.01.2021 01:00
Questions on the website: 13722360