我尝试按照代码
编写一个阶乘数程序的代码public class Factorial {
public static void main(String[] args) {
Scanner in = new Scanner(System. in );
System.out.println("Enter the number whose factorial you want: ");
int n = in .nextInt();
int f = 1;
for (int i = n; i & gt; 0; i--) //error show what's wrong in for loop {
f = f * i;
}
System.out.println("Factorial of " + n + " is " + f);
}
}
答案 0 :(得分:4)
是的,您的错误点是this.Then(/^I should see the login page$/, function () {
browser.wait(EC.titleContains('Welcome'), 30000);
return expect(browser.getTitle()).to.eventually.contain('Welcome');
});
,它不是运营商的实际运营商& gt;
。来自>
的 XML编码是>
。
使用此:
>
而不是
for (int i = n; i > 0; i--)
通常在您从某处复制过去的代码时会发生这种情况。
完整的代码应该是:
for (int i = n; i & gt; 0; i--)