Reading n inputs

the following code gave no output
#include
using namespace std;
int main() {
int n;
cin>>n;
int i=1;
int sum=0;
float avg=0;
while(i<=n){
int no;
cin>>no;
sum= sum+no;

}
avg=float(sum)/n;
cout<<"The sum is"<<sum<<endl;
cout<<"The average is"<<avg<<endl;
return 0;

}

please save you code at here and then send the link generated so that we can see and check or modify your code