In Visual Studio 2017
Populate a two-dimensional array with the following prices in this table order: 32.34 22.33 68.30 36.99 43.94 63.67 55.89 67.44 13.77 87.13 54.99 87.78 18.42 21.60 45.98 66.03 41.38 74.48 24.21 67.10 61.23 Write a method/function which uses loops and is called from main() that increases the prices by 6.5% and stores the new price in the same array. All changes to the array must be made inside the method/function. Please display the original array in table form as well as the new array with the 6.5% price increase.
#include <iostream>
using namespace std;
void change(double a[7][3])
{
int i,j,k;
for(i=0;i<7;i++)
{
for(j=0;j<3;j++)
{
//cout<<a[i][j]<<" ";
a[i][j]=1.065*a[i][j];
}
//cout<<endl;
}
for(i=0;i<7;i++)
{
for(j=0;j<3;j++)
{
cout<<a[i][j]<<" ";
}
cout<<endl;
}
return ;
}
int main() {
double a[7][3]={32.34, 22.33, 68.30 ,36.99 ,43.94
,63.67 ,55.89, 67.44, 13.77 ,87.13 ,54.99, 87.78, 18.42, 21.60,
45.98, 66.03 ,41.38, 74.48 ,24.21, 67.10 ,61.23};
int i,j,k;
cout<<"The original prices are :\n";
for(i=0;i<7;i++)
{
for(j=0;j<3;j++)
{
cout<<a[i][j]<<" ";
}
cout<<endl;
}
cout<<endl;
cout<<"The prices after 6.5% increase
:\n";
change(a);
return 0;
}
In Visual Studio 2017 Populate a two-dimensional array with the following prices in this table order:...
In visual studio Populate 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. Use a 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. Make this happen by passing the subscript value and not the entire array. The addition of the...