This repository has been archived by the owner on Jun 16, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f776eda
commit 9c9f127
Showing
3 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <iostream> | ||
#include <cstdio> | ||
|
||
using namespace std; | ||
|
||
int main() { | ||
int a, b, aux; | ||
cout << "Inserisci valore a: "; | ||
cin >> a; | ||
cout << "Inserisci valore b: "; | ||
cin >> b; | ||
// aux = a; | ||
// a = b; | ||
// b = aux; | ||
a = a^b; | ||
b = a^b; | ||
a = a^b; | ||
cout << "Dopo lo scambio: a=" << a << ", b=" << b << endl; | ||
return 0; | ||
} |
Binary file not shown.