Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Commit

Permalink
esercizio parte 5
Browse files Browse the repository at this point in the history
  • Loading branch information
mc-cat-tty committed Sep 27, 2021
1 parent f776eda commit 9c9f127
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Binary file removed esercitazioni/.5_input_divisione.cpp.swp
Binary file not shown.
20 changes: 20 additions & 0 deletions esercitazioni/5_scambio_int.cpp
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 modified esercitazioni/a.out
Binary file not shown.

0 comments on commit 9c9f127

Please sign in to comment.