Răspuns:
using namespace std;
#include <iostream>
#include <stdlib.h>
#include <math.h>
int main()
{
int max,min,i,t1,t2,t;
//min=-10000;max=10000
cout<<"Temperatura luna 1 ";
cin>>t1;
cout<<"\n";
cout<<"Temperatura luna 2 ";
cin>>t2;
cout<<"\n";
if (t1<=t2) {
min=t1;
max=t2;
}
for(i=3;i<=12;i++){
cout<<"Temperatura luna "<<i<<" ";
cin>>t;
cout<<"\n";
if (min>t)
min=t;
if (max<t)
max=t;
}
cout<<min<<" "<<max<<" \n";
cout<<"Diferenta dintre maxim si minim este "<<(max-min);
}