4. Swap Two Numbers
Foundation1000 ms256 MBSolved by 100%
Read two integers a and b from one line, then print them in the
opposite order, b first, then a, separated by a single space.
Constraints - `-1000000 ≤ a, b ≤ 1000000`
Input
A single line containing two integers, separated by a space.
Output
Print the two integers on one line, separated by a single space, in the opposite order to the input.
Input3 7
Output7 3
Noteswaps two ordinary values
Input-5 12
Output12 -5
Noteswaps across a sign change
Hints
Four rungs, in order. The last two open once you have submitted an attempt. A wrong one counts.
Hint 1Where to start
Hint 2The approachOpen hint 1 first. This one carries on from it.
Hint 3PseudocodeOpen hint 2 first. This one carries on from it.
Hint 4Full solutionOpen hint 3 first. This one carries on from it.