Ving problem Read in 20 numbers, each of which islbetween 20 and 50, inclusive. As each number is read, validate it and check their value. Numbers greater than 40 are to be stored as they are. Numbers which are less than or equal to 40 should be doubled and then stored. After reading all the values, display all the valmes which wore stored

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter10: Pointers
Section10.3: Pointer Arithmetic
Problem 4E
icon
Related questions
Question

In c++

(4) Use a one-dimensional array to solve the following problem. Read in 20 numbers, each of
which is between 20 and 50, inclusive. As each number is read, validate it and check their
value. Numbers greater than 40 are to be stored as they are. Numbers which are less than
or equal to 40 should be doubled and then stored. After reading all the values, display all
the values which were stored.
190 intct
Transcribed Image Text:(4) Use a one-dimensional array to solve the following problem. Read in 20 numbers, each of which is between 20 and 50, inclusive. As each number is read, validate it and check their value. Numbers greater than 40 are to be stored as they are. Numbers which are less than or equal to 40 should be doubled and then stored. After reading all the values, display all the values which were stored. 190 intct
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Concept of pointer parameter
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,