Поскольку код остается в силе, дозорный включается в расчет среднего.Любые указатели о том, как разорвать петлю, не включая стража?
#include <iostream>
using namespace std;
int main ()
{
int fahr=0,cent=0,count=0,fav=0;
while (fahr!=-9999)
{
count ++;
cout<<"Input the fahrenheit temp to be converted to centigrade or enter -9999 "<<endl;
cin>>fahr;
cent=(float)(5./9.)*(fahr-32);
cout<<"The inputed fahr "<<fahr<<endl;
cout<<"The cent equivalent "<<cent<<endl;
}
fav=(float)(fav+fahr)/count;
cout<<"Average"<<fav<<endl;
return 0;
}