此方法采用 int - 但是我不断收到错误消息,有人知道为什么吗?
//finds the factors of a number that was entered
public void findFactors(int t)
{
System.out.println("factors of " +t+ " are:");
for(int i =0; i<t+1; i++)
{
if(t%i == 0)
{
System.out.println(i);
}
}
}