Question
2. Write a short program that uses two parallel arrays. Explain the code.
3. Write a program that will use loops to generate the table shown below. The numbers are to be formatted as shown with 2 decimal places.
N N+0 N+.25 N+.5 N+.75
0 0.00 0.25 0.50 0.75
1 1.00 1.25 1.50 1.75
2 2.00 2.25 2.50 2.75
3 3.00 3.25 3.50 3.75
Solution Preview
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.
//Problem 2//This code converts an array of farenheit temperatures into celsius temperatures. It's parallel because each element in the
//f array is equivalent to one in the c array. For the sake of this question we can assume the f array has already been populated
int main()
{
int f[10], c[10];
for(int i = 0; i < 10; i++)
{
c[i] = (f[i]-32) * 5/9;
}
}...