Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment Write a program that finds the summation of particular elements within a sequence of numbers. First, the program will read the number of elements

image text in transcribed
Assignment Write a program that finds the summation of particular elements within a sequence of numbers. First, the program will read the number of elements in the sequence (numElements) as an int Then, that many real numbers will be read into an array of double (elementSequence). Finally, an index number will be read (indexNumber) as an int After getting these inputs, the program will calculate a limit value as below: Limit = (elementSequence's indexNumber element) *1.6 -2.84 Finally, the program will calculate and print out the sum all the elements in the sequence that are less than the limit as a double value. The comparison between the limit and an individual element of the sequence MUST be done within a function (isLessThanLimit). NOTE: YOU MUST use a 10 array in this question. The initial element of an array has the index value of 0. NOTE: If there are less number of elements than the indexNumber, then indexNumber should be set to numElements-1. NOTE: numElements CANNOT be given more than 5000. NOTE: The comparison between the limit and an individual item MUST be done in the function. All other functionalities MUST be done in the main function Assignment Write a program that finds the summation of particular elements within a sequence of numbers. First, the program will read the number of elements in the sequence (numElements) as an int Then, that many real numbers will be read into an array of double (elementSequence). Finally, an index number will be read (indexNumber) as an int After getting these inputs, the program will calculate a limit value as below: Limit = (elementSequence's indexNumber element) *1.6 -2.84 Finally, the program will calculate and print out the sum all the elements in the sequence that are less than the limit as a double value. The comparison between the limit and an individual element of the sequence MUST be done within a function (isLessThanLimit). NOTE: YOU MUST use a 10 array in this question. The initial element of an array has the index value of 0. NOTE: If there are less number of elements than the indexNumber, then indexNumber should be set to numElements-1. NOTE: numElements CANNOT be given more than 5000. NOTE: The comparison between the limit and an individual item MUST be done in the function. All other functionalities MUST be done in the main function

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions

Question

Explain the various methods of job evaluation

Answered: 1 week ago

Question

Differentiate Personnel Management and Human Resource Management

Answered: 1 week ago

Question

Describe the functions of Human resource management

Answered: 1 week ago