Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

#include<iostream> #include<math.h> using namespace std; int main() { //variable

ID: 3615277 • Letter: #

Question

#include<iostream>

#include<math.h>

using namespace std;

int main()

{

//variables

double fahrenheit[5],celsius[5];

int count = 0;

//calculation

for (count = 0; count<=4; count= count + 1)

{

cout<<"enter temperature in Fahrenheit"<<(count+1)<<endl;

cin>>fahrenheit[count];

}

cout<<endl;

//Formula to convert from Fahrenheit to Celsius: (5/9)*(degF-32).

for (count = 0; count<5; count= count + 1)

{

celsius[count]=(5.0/9.0)*(fahrenheit[count]-32);

}

cout<<"____________Temp_____________ ";

cout<<" Fahrrenheit. Celsius. ";

count=0;

while(count<=4)

{

cout<<fahrenheit[count]<<" | "<<celsius[count]<<" ";

count=count+1;

}

system("pause");

}

Explanation / Answer

for (count= 0; count<=4; count = count + 1)

{

cout<<"entertemperature in Fahrenheit "<<(count+1)<<endl;

cin>>fahrenheit[count];

}

After above code , the value of count=4;

SO, you must to reset i.e count=0;