package tamirnfasle2;
import java.util.Scanner;
public class Tamrine4 {
private int number;
Tamrine4(int n)
{
number=n;
}
public void Calculate()
{
float sum=0.0f;
for(int i=1;i<=number;i++)
{
i=1/i;
sum=sum+i;
}
System.out.println("Sum Reverse Number Between [1," + number + "] Is :" + sum);
}
public static void main(String [] args){
Scanner inputNumber = new Scanner (System.in);
System.out.println("Enter Number : ");
int number = inputNumber.nextInt();
Tamrine4 ClassSumInverse = new Tamrine4(number);
ClassSumInverse.Calculate();
}
}
What is Wrong With This Code?! It's Not Working!!!