Skip to content
Snippets Groups Projects
Commit fb061bee authored by Nicolas M. Thiéry's avatar Nicolas M. Thiéry
Browse files

Merge branch 'master' of gitlab.lri.fr:nthiery/wims-info

parents 4cef55b8 a9dddd70
No related branches found
No related tags found
No related merge requests found
Showing
with 160 additions and 0 deletions
#include <iostream>
using namespace std;
void f(int x, int y) {
x = x+1;
y = y-1;
}
int main() {
int x,y;
x = 1;
y = 2;
f(y,x);
cout << x << ", " << y << endl;
}
#include <iostream>
using namespace std;
int g(int x, int y) {
x = x+1;
return y-1;
}
int main() {
int x,y;
x = 1;
y = 2;
g(x,y);
cout << x << ", " << y << endl;
}
#include <iostream>
using namespace std;
int f(int x, int y) {
x = x+1;
return y-1;
}
int main() {
int x,y;
x = 1;
y = 2;
x = f(y,x);
cout << x << ", " << y << endl;
}
#include <iostream>
using namespace std;
int main () {
int x, y;
y = -3;
x = -y;
if ( y > 0 ) {
y = 2*x;
} else {
y = -y;
}
cout << x << ", " << y << endl;
}
#include <iostream>
using namespace std;
int main () {
int x, y;
x = 0;
y = 0;
while ( x < 10 ) {
x = x + 1;
y = 1;
}
cout << x << ", " << y << endl;
}
#include <iostream>
using namespace std;
int main () {
int x, y;
x = 5*(2/5);
y = (5*2)/5;
cout << x << ", " << y << endl;
}
#include <iostream>
using namespace std;
int main() {
int a, b;
a = 7;
b = 4;
a = b;
b = a;
cout << a << endl;
cout << b << endl;
return 0;
}
#include <iostream>
using namespace std;
int main() {
int a, b, c;
a = 7;
b = 4;
c = a;
a = b;
b = c;
cout << a << endl;
cout << b << endl;
return 0;
}
#include <iostream>
using namespace std;
int main() {
int a, b, c;
a = 7;
b = 4;
c = b;
b = a;
a = c;
cout << a << endl;
cout << b << endl;
return 0;
}
#include <iostream>
using namespace std;
int main() {
int a, b, c;
a = 7;
b = 4;
a = b;
c = a;
b = c;
cout << a << endl;
cout << b << endl;
return 0;
}
#include <iostream>
using namespace std;
int main() {
int a, b, c;
a = 7;
b = 4;
b = a;
c = b;
a = c;
cout << a << endl;
cout << b << endl;
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment