CΒ±+
Christmas tree πŸŽ„πŸŽ„

Swapping of two numbers in C++

Swapping of two numbers in C++

CΒ±+

Swapping of two numbers in C++

 

Swapping of two numbers :

#include <iostream>
using namespace std;

int main()
{
    int a = 5, b = 10, temp;

    cout << "Before swapping." << endl;
    cout << "a = " << a << ", b = " << b << endl;

    temp = a;
    a = b;
    b = temp;

    cout << "\nAfter swapping." << endl;
    cout << "a = " << a << ", b = " << b << endl;

    return 0;
}

 

Topics Covered :

  • swapping two numbers
  • c++ program to swap two numbers
  • swapping
  • c++ coding program
  • c++ language tutorial for beginners
  • c++ programming
  • c++ examples

 


 

 


 

Thanks for reading this blog. Hope you get satisfied with the blog and definitely this blog must have valued your time and effort of reading.

Take a time to connect our other digital creations such as Instagram , Facebook and Youtube.

 

πŸ§‘β€πŸ’»πŸ§‘β€πŸ’» Social Media Links of Tech DCode :

πŸ‘‰πŸ» YouTube : https://www.youtube.com/channel/UCjJnEdeugftBwQ3yMuD4B_A
πŸ‘‰πŸ» Instagram : https://www.instagram.com/thetechdcode/
πŸ‘‰πŸ» Facebook Page : https://www.facebook.com/thetechdcode
πŸ‘‰πŸ» Twitter : https://twitter.com/thetechdcode
πŸ‘‰πŸ» Telegram Channel : https://t.me/thetechdcode
πŸ‘‰πŸ» Tech DCode Linktree : https://linktr.ee/thetechdcode
πŸ‘‰πŸ» My Personal Handles : https://linktr.ee/virtualshivamin

πŸ§‘β€πŸ’»πŸ§‘β€πŸ’» Social Media Links of SHIVAM SINGH (OWNER) :

πŸ‘‰πŸ» Instagram : https://www.instagram.com/virtualshivamin/
πŸ‘‰πŸ» Facebook Page : https://www.facebook.com/virtualshivamin/
πŸ‘‰πŸ» Twitter : https://twitter.com/virtualshivamin/
πŸ‘‰πŸ» Personal Linktree : https://linktr.ee/virtualshivamin 

Leave a Reply

Your email address will not be published. Required fields are marked *