if-else 是一个条件语句,因此取决于 if 它将执行任意一个语句。
if-else
if
程序中的一个示例:
Say you enter a number 30 when you run the program, it will print "slide under" but suppose if you enter 10 your program will print "jump over".
因此,根据您的输入,它将打印其中一个语句,但不会同时打印这两个语句。