i make this coding plaz check
#include<cstdlib>
#include<iostream>
void high_Tenp(int[],int);
void low_ten(int[]);
void Average_tenp(int[],int);
using namespace std;
int main(int argc, char*argv[])
{
cout<<"\t\t*****************"<<endl
<<"\t\t TEMPRATURE CALCULATION SYSTEM"<<endl
<<"\t\t************************************"<<endl<<endl;
int n;
cout<<"Enter the number of consecutive days to read theritemperature:";
cin>>n;
int x[n];
int i,j,temp;
for(i=0;i<n;i++)
{
cout<<endl<<"Enter temperature for day"<<i+1<<":";
cin>>x[i];
}
for(i=0;i<n;i++)
{
for(j=0;j<n-1;j++)
{
if(x[j] > x[j+1])
{
tmp = x[j];
x[j]=x[j+1];
x[j+1]=tmp;
}
}
}
Average_Tenp(x,n);
high_Tenp(x,n);
low_Tenp(x);
system("pause");
}
voidhigh_Tenp(inta[],intarraysize)
{
cout<<"The Higest Temprature is:"<<a[arraysiz-1]<<endl;
}
void low_Tenp(inta[])
{
int b=0;
cout<<"The Lowest Temprature is:"<<a[b]<<endl;
}
void Average_Tenp(int a[],int arraysize)
{
int i;
double c=0;
for (i = 0 ; i<arraysize; i ++)
{
c=c+a[i];
}
c=c/i;
cout<<endl<<"The Average Tempure is:"<<c<<endl;
}
void swap(int*x,int*y)//function using pointers to interchange the values
{
int tmp;
if(*x>*y)
{
tmp = * x;
* x = * y;
* y = tmp;
}
}