C++ program to Swap two numbers (Using extra variable) | C++

preview_player
Показать описание


More c++ programs, topics, and much more will be uploaded and explained in detail.

Subscribe to my channel so that you do not miss any topic.

My other videos-

Рекомендации по теме
Комментарии
Автор

good explanation to remember the concept of swapping for me like slow-learners

haker
Автор

So finally I learned how to swap...thanks bro😌

laibarajpoot
Автор

This video was very useful. Simple and easy to understand. Post more programs

sudarani
Автор

i realy appreciated what you're doing my friend, thank you so much for this video. you don't know how much you have helped me to understand this problem. GOD bless you

robertolivestream
Автор

thank you sir for explaining in simple manner and getting my concept clear 👍🙏

prathamshetty
Автор

you made it easier for me to understand ❤

welittletalks
Автор

Great explanation for newbies like me, very appreciated! in paper its even more clear to learn

RomiCoca
Автор

You solve it in how an amazing way which is very simple and easy to understand excellent 👍

gtqypfo
Автор

Great way of explanations buddy bud I was trying to understand how this was working and everything was bouncing over my head on Now I got what was happening here, Thank you💙

equizergaming
Автор

Idk why you didn't get likes ...the video was so helpful. 🔥

hollyhorsfall
Автор

Your way of explaining is amazing Sir
I didn't know that swaping can be this much easy
My Subject teacher was explaining in a very difficult way and I thought I would never be able to understand how to swap two numbers.
Thank u Sir
I am your new subscriber

Wania
Автор

Thank u soo much bhai. I was literally banging my head that how is this possible and how it works, but u made it easy for me, make more videos like these. Let u get 1million subscribers. Thank u sooo much

sukruthachandrashekar
Автор

please can you make us a video by explaning the pointers ?

robertolivestream
Автор

I don't understand why do we need to used third variable . What's the work of the third variable???

lipikajena
Автор

#include <iostream>

using namespace std;

int main()
{
int num1, num2, temp;

cout << "enter the first number?" << endl;
cin >> num1;

cout << "enter the second number?" << endl;
cin >> num2;

cout << "before swap" << endl;
cout << num1 << endl;
cout << num2 << endl;

temp = num1;
num1 = num2;
num2 = temp;

cout << "after swap" << endl;
cout << num1 << endl;
cout << num2 << endl;

return 0;
}

deepblackoutlaw
welcome to shbcf.ru