#include <iostream>
#include <math.h>
#include <ctype.h>

using namespace std; 
int main()
{
  int n=0,tot=0;
  float sum = 0;
  float average = 0;
  float product = 1;


  cout<<"Type an integer and press Enter:\n";
  cin>>n;
  /*
     Your logic goes here
  */
  for(int i=1;i<=n;i++){
       cout<<sum<<endl;
       sum= sum+(1.0/i);
       product=product*(1.0/i);
       tot++; // You don't need tot - you already have `n`
   }
  cout<<"Sum, product and average of reciprocals are:\n"; 
  cout<<sum<<endl;
  cout<<product<<endl;
  cout<<average<<sum/n<<endl;
} 