Daily CPP Programming Coding Challenge

Sharpen your programming skills by solving a new CPP Programming coding problem everyday!

Ends In: --:--:--
Solution Available In: --:--:--
Jul
24
2026
Easy 50 Points

Swap Two Numbers in C++

Write a C++ program to swap two integers a and b and print them separated by space.

Input Format

Two integers a and b.

Output Format

Swapped space-separated integers.

Constraints

1 <= a, b <= 1000

Examples

Example 1:
Input:
5 10
Output:
10 5
Explanation: Swaps 5 and 10
CPP Programming
Theme:
Console Output
Press 'Run Code' to execute your program against the sample test cases.
Enter Submission Details
Hints Available
  1. Use temporary variable temp or swap(a, b)
Challenge Completed!
🎉
🚀
🔥
🌟
🎊
🏆
✨ Daily Coding Challenge ✨
🎉 SUCCESSFULLY SOLVED 🎉
User Name
from Location
Swap Two Numbers in C++
Success Card
Generating your shareable success card...
Official Solution
Go Back Top