Jump to content

Integer comparison: Difference between revisions

m (syntax highlighting fixup automation)
Line 3,083:
<span style="color: #7060A8;">printf</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">" %g"</span><span style="color: #0000FF;">,</span><span style="color: #000000;">b</span><span style="color: #0000FF;">)</span>
<!--</syntaxhighlight>-->
 
=={{header|Phixmonti}}==
<syntaxhighlight lang="Phixmonti">/# Rosetta Code problem: http://rosettacode.org/wiki/Integer_comparison
by Galileo, 10/2022 #/
 
"Enter first number: " input tonum nl
"Enter second number: " input tonum nl
 
over over -
rot print " is " print
/# dup 0 < if drop "less" else 0 > if "greater" else "equal" endif endif #/
dup 0 < if drop "less" else dup 0 > if drop "greater" else dup 0 == if drop "equal" endif endif endif
print " than " print print
</syntaxhighlight>
{{out}}
<pre>Enter first number: 5
Enter second number: 1
5 is greater than 1
=== Press any key to exit ===</pre>
 
=={{header|PHL}}==
57

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.