class work
{
public void series()
{
int x,a=2, n=10;
float sum=0.0F;
for(x=1;x<=n;x=x+1)
{
sum=sum+(float) (a/x);
}
System.out.println(“The sum of the series is “+sum);
}
}