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, 22.06.2019 12:10
Linux is distributed under gnu gpl. why is this important? a. it ensures that only torvalds can profit from the sale of linux b. it prevents unknowledgeable users from downloading programs they don't know how to operate. c. it provides protection for the developers who created linux. d. it states that anyone can copy, modify, and share the program if changes are made public.
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
question
Computers and Technology, 23.06.2019 20:30
What are some settings you can control when formatting columns?
Answers: 1
question
Computers and Technology, 24.06.2019 08:00
Can someone work out the answer as it comes up in one of my computer science exams and i don't understand the cryptovariables
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
Chemistry, 14.07.2020 07:01
question
Chemistry, 14.07.2020 07:01
question
Mathematics, 14.07.2020 07:01
question
Mathematics, 14.07.2020 07:01
question
Mathematics, 14.07.2020 07:01
question
Mathematics, 14.07.2020 07:01
Questions on the website: 13722361