Swap Two Numbers (No Temp)

PHP Easy 4 views
Back to Questions
Next Sum 1 to N Easy N

Problem Description

Two integers a and b are given. Swap them without using a third variable and print the result.

Input Format

One line: a b.

Output Format

One line: swapped_a swapped_b.

Sample Test Case

Input:
5 9
Output:
9 5

Constraints

-10^9

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Next