Anonymous user
Integer comparison: Difference between revisions
m
Spelling/grammar/aesthetics.
m (→{{header|J}}: Improved grammar in commentary.) |
m (Spelling/grammar/aesthetics.) |
||
Line 1:
{{task}}{{basic data operation}}Get two integers from the user, and then output if the first one is less, equal or greater than the other. Test the condition ''for each case separately'', so that ''all three comparison operators are used'' in the code.▼
▲Get two integers from the user, and then output if the first one is less, equal or greater than the other. Test the condition ''for each case separately'', so that ''all three comparison operators are used'' in the code.
=={{header|Ada}}==
Line 75 ⟶ 73:
(t (format t "Cannot determine relevance between ~A and ~B!" a b)))))
After hitting enter, the REPL is expecting the two numbers right away. You can enter the two numbers, and the result will print immediately.
(defun compare-integers ()
Line 290 ⟶ 288:
'''Interpreter:''' [[Perl]] 5.x
sub test_num {
Line 306 ⟶ 304:
};
All three tests in one.
sub test_num {
|