#include<iostream.h>
#include<conio.h>
void main()
{
int n, i, sum=0;
float av;
clrscr();
cout<<"\n Enter the value of N: ";
cin>>n;
for( i =1; i <=n; i++)
{
sum= sum+ i;
}
cout<<"\n Sum is: "<< sum;
av= (float) sum/n;
cout<<"\n Average is: "<< av;
getche();
}