Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
1 result

Target

Select target project
  • nthiery/wims-info
  • medimegh/wims-info
  • ventos/wims-info
  • bokaris/wims-info
4 results
Select Git revision
  • master
1 result
Show changes
Showing
with 289 additions and 0 deletions
#include <iostream>
using namespace std;
int main() {
for ( int i = 5; i <= 8 ; i = i + 1 ) {
cout << i << endl;
i = i + 1;
}
return 0;
}
#include <iostream>
using namespace std;
int main() {
int x, I1;
for ( I1 = 0; I1 < 6; I1++ ) {
x = 2 * I1 + 1;
cout << x << endl;
}
}
#include <iostream>
using namespace std;
int main() {
int x;
int i;
for (i = 5; i <= 8 ; i = i + 1 ) {
x = i;
}
cout << "i = " << i << endl;
cout << "x = " << x << endl;
return 0;
}
#include <iostream>
using namespace std;
int main() {
for ( int i = 0; i <= 3; i++ ) {
for ( int j = 1; j <= 2; j++) {
cout << i << " " << j << endl;
}
}
}
#include <iostream>
using namespace std;
int main() {
for ( int i = 1; i <= 2; i++ ) {
for ( int j = 0; j <= 3; j++) {
cout << i << " " << j << endl;
}
}
}
#include <iostream>
using namespace std;
int main() {
for ( int i = 0; i <= 3; i++ ) {
for ( int j = 1; j <= 2; j++) {
cout << j << " " << i << endl;
}
}
}
#include <iostream>
using namespace std;
int main() {
for ( int i = 1; i <= 2; i++ ) {
for ( int j = 0; j <= 3; j++) {
cout << j << " " << i << endl;
}
}
}
#include <iostream>
using namespace std;
int main() {
int a, b, resultat;
resultat = 0;
a = 3;
cin >> b;
for ( int k = 0; k < a; k++ ) {
for ( int l = 0; l < b; l++) {
resultat = resultat + 2;
}
}
cout << resultat << endl;
}
#include <iostream>
using namespace std;
int max(int x, int y) {
if (x > y) {
return x;
}
return y;
}
int blackJack(int x, int y) {
if (x > 21) {
if (y > 21) {
return 0;
}
return y;
}
if (y > 21) {
return x;
}
return max(x, y);
}
int main() {
int x, y;
x = 15;
y = 22;
cout << max(x, y) << endl;
cout << blackJack(x, y) << endl;
x = 12;
y = 17;
cout << max(x, y) << endl;
cout << blackJack(x, y) << endl;
x = 23;
y = 25;
cout << max(x, y) << endl;
cout << blackJack(x, y) << endl;
return 0;
}
#include <iostream>
using namespace std;
int f(int n) {
return n * n;
}
int main() {
int a = 5;
a - 2;
cout << f(a) << endl;
}
#include <iostream>
using namespace std;
int f(int n) {
return 2 * n - 1;
}
int main() {
int a = 7;
f(a);
cout << a << endl;
}
#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 F1(int I1) {
int resultat = 1;
for ( int I2 = 1; I2 <= I1; I2++ ) {
resultat = resultat * I2;
}
return resultat;
}
int main() {
int I3;
I3 = 4;
cout << I3 << "! = " << F1(I3) << endl;
return 0;
}
#include <iostream>
using namespace std;
int f(int n) {
int i;
int cpt = 0;
for (i = 1; i <= n; i++) {
cpt = cpt + i;
}
return cpt;
}
int main() {
if (f(5) < 11) {
cout << "Petit" << endl;
} else {
cout << "Grand" << 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;
double max(double a, double b) {
if ( a >= b ) {
return a;
} else {
return b;
}
}
int main() {
cout << max(1.0, 3.0) << endl;
cout << max(5.0, 2.0) << endl;
cout << max(2.0, 2.0) << endl;
return 0;
}
#include <iostream>
using namespace std;
int main() {
int x = -2;
if ( x < 0 ) {
cout << "negatif" << endl;
} else {
cout << "positif" << endl;
}
return 0;
}
#include <iostream>
using namespace std;
int main() {
int x = 2;
if ( x < 0 ) {
cout << "negatif" << endl;
} else {
cout << "positif" << endl;
}
return 0;
}
#include <iostream>
using namespace std;
int main() {
int x = 2;
if ( x > 1 and x < 3 ) {
cout << "oui" << endl;
} else {
cout << "non" << endl;
}
return 0;
}