1) Create a array of Fahrenheit temperatures, as follows int fahr []= {0,1,2,3,4,5,6,7,8,9,10,32,33,34,35,36,37,38,39,40}; 2) create a function convert(int fahr) that converts Fahr to Cels, such as you did in class, outside of main(), above it. 3) create a loop, that prints side by side Fahrenheit temperatures from the array above (in a similar way how you printed an array in class) and Celsius temperature by calling function convert(...) in the loop to get a matching Celsius temperature for each Fahrenheit temperature that you print. Do you program in C++ compiler online. Compile it step by step, making sure your code does not have syntax errors as you add new contents.
1) Create a array of Fahrenheit temperatures, as follows
int fahr []= {0,1,2,3,4,5,6,7,8,9,10,32,33,34,35,36,37,38,39,40};
2) create a function convert(int fahr) that converts Fahr to Cels, such as you did in class, outside of main(), above it.
3) create a loop, that prints side by side Fahrenheit temperatures from the array above (in a similar way how you printed an array in class) and Celsius temperature by calling function convert(...) in the loop to get a matching Celsius temperature for each Fahrenheit temperature that you print.
Do you
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images