Answer:
#include <iostream>
using namespace std;
void func(int&num)
{
if(num>=70)
num+=15;
}
int main()
{
int arr[]={90, 61, 74, 42, 83, 51, 71, 83, 98, 87, 94, 68, 44, 66};
for(int i=0;i<14;i++)
{
func(arr[i]);
}
cout<<"Adjusted scores are: ";
for(int i=0;i<14;i++)
{
cout<<arr[i]<<" ";
}
cout<<endl;
return 0;
}
Explanation:
Our program is a one-dimensional array with the following grades in this order: 90, 61, 74, 42, 83, 51, 71, 83, 98, 87, 94, 68, 44, and 66.
It made use of loop to call a method from main() that adds 15 points to all student grades that are a C or above. A C is defined as a score of 70 or above.
It further uses a loop to show final values within the array. The final array values show the new adjusted grades.