Write a C++ statements to do the following: a. Declare an array A of 50 elements of type int b. output the value of the first element of the array A c. set the 25th element of the array A to 26 d. set the value of the 10th element of the array A to 3 times the value of the 40th element of the array plus 10 e. Use for the loop to ouput the value of an element of array A if its index/subscript is a multiple of 2 or 3
Write a C++ statements to do the following: a. Declare an array A of 50 elements of type int b. output the value of the first element of the array A c. set the 25th element of the array A to 26 d. set the value of the 10th element of the array A to 3 times the value of the 40th element of the array plus 10 e. Use for the loop to ouput the value of an element of array A if its index/subscript is a multiple of 2 or 3
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 6SA: Write C+ + statement(s) to do the following: (1, 2) Declare an array alpha of 50 components of type...
Related questions
Question
Write a C++ statements to do the following:
a. Declare an array A of 50 elements of type int
b. output the value of the first element of the array A
c. set the 25th element of the array A to 26
d. set the value of the 10th element of the array A to 3 times the value of the 40th element of the array plus 10
e. Use for the loop to ouput the value of an element of array A if its index/subscript is a multiple of 2 or 3
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
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.Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr