Java 如何编写不打印的伪代码?

Java 如何编写不打印的伪代码?,java,Java,我认为它不是印刷品,因为NOT是一个合乎逻辑的no。但我不太确定。有人能帮我吗 IF first operand > second operand THEN PRINT question ELSE IF first operand<= second operand THEN NOT PRINT question 如果第一个操作数>第二个操作数,则 打印问题 否则 如果第一个操作数如果要用伪代码编写,则只需用英语编写: if (first_operand > second_op

我认为它不是印刷品,因为NOT是一个合乎逻辑的no。但我不太确定。有人能帮我吗

IF first operand > second operand THEN
PRINT question
ELSE
IF first operand<= second operand THEN
NOT PRINT question
如果第一个操作数>第二个操作数,则
打印问题
否则

如果第一个操作数如果要用伪代码编写,则只需用英语编写:

if (first_operand > second_operand){
    print(question)
}
if (first_operand <= second_operand) {
    // if you're not printing the question, then state
    what you wish to print as argument.
    print(answer)
}
if(第一个操作数>第二个操作数){
打印(问题)
}

如果(第一个操作数编程是关于“应该做什么、什么时候和如何做”,而不是什么不应该做。)那么,你应该只保留伪代码的前两行。它是伪代码——基本上是英语。随便你怎么写。但在这种情况下,通常根本不包括第二个
(如果
),编程就是给机器指令,告诉它该做什么。如果无事可做,就什么也不要写。哦,好吧。谢谢!同意康斯坦丁·约夫科夫的意见。在Stackey@Ansh的一个艰难的开始。我们继续努力。