Q1.Write a C++ program that declares three arrays, Markl, Mark2, Result. and carries out the following: 1. Allow the user to fill markl and mark2 with 5 integer elements. 2. Find the average of each two corresponding elements of the two arrays mark1 and mark2 then compare the average with 60. If the average is greater than or equal to 60 then fill the corresponding element of the third array with the character (P), Otherwise, file the corresponding element with the character (F).

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.1: One-dimensional Arrays
Problem 10E: (Electrical eng.) Write a program that specifies three one-dimensional arrays named current,...
icon
Related questions
Question
Q1 Write a C++ program that declares three arrays, Mark1, Mark2, Result. and carries out the following:
1. Allow the user to fill mark1 and mark2 with 5 integer elements.
2. Find the average of each two corresponding elements of the two arrays mark1 and mark2 then
compare the average with 60. If the average is greater than or
equal to 60 then fill the corresponding element of the third array with the character (P), Otherwise, file the corresponding element with the character (F).
Mark1
70
50
66
90
Mark2
60
30
70
80
60
Result
40
LL
Transcribed Image Text:Q1 Write a C++ program that declares three arrays, Mark1, Mark2, Result. and carries out the following: 1. Allow the user to fill mark1 and mark2 with 5 integer elements. 2. Find the average of each two corresponding elements of the two arrays mark1 and mark2 then compare the average with 60. If the average is greater than or equal to 60 then fill the corresponding element of the third array with the character (P), Otherwise, file the corresponding element with the character (F). Mark1 70 50 66 90 Mark2 60 30 70 80 60 Result 40 LL
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
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
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