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, 23.06.2019 01:00
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Does read theory have answers keys ?
Answers: 1
question
Computers and Technology, 24.06.2019 00:40
What is the error in the following pseudocode? module main() call raisetopower(2, 1.5) end module module raisetopower(real value, integer power) declare real result set result = value^power display result end module
Answers: 1
question
Computers and Technology, 24.06.2019 00:50
Which of the following is not a key player in the sale of travel products?
Answers: 2
You know the right answer?
Write a C++ program that tests whether the array has four consecutive numbers with the same values....
Questions
question
Mathematics, 17.10.2021 09:50
question
Mathematics, 17.10.2021 09:50
question
Mathematics, 17.10.2021 09:50
question
Mathematics, 17.10.2021 09:50
Questions on the website: 13722360