Show 例子
优质
小牛编辑
134浏览
2023-12-01
以下简单的示例程序演示了关系运算符。 在test.ex文件中复制并粘贴以下Euphoria程序并运行此程序 -
#!/home/euphoria-4.0b2/bin/eui
integer a = 10
integer b = 20
printf(1, "a = b = %d\n", (a = b) )
printf(1, "a != b = %d\n", (a != b) )
printf(1, "a > b = %d\n", (a > b) )
printf(1, "a < b = %d\n", (a < b) )
printf(1, "b >= a = %d\n", (b >= a) )
printf(1, "b <= a = %d\n", (b <= a) )
这将产生以下结果。 这里0代表假,1代表真。
a = b = 0
a != b = 1
a > b = 0
a < b = 1
b >= a = 1
b <= a = 0