Skip to content
Snippets Groups Projects
Commit 9b11bc0c authored by Adrien Rougny's avatar Adrien Rougny
Browse files

-data/static/

parent 86edcf13
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 174 deletions
File deleted
#include <iostream>
#include <fstream>
using namespace std;
int main() {
ofstream fichier("essai.txt");
fichier << 10 << 24 << endl;
fichier.close();
ifstream fichier2("essai.txt");
int i;
fichier2 >> i;
fichier2.close();
cout << i << endl;
return 0;
}
File deleted
#include <iostream>
#include <sstream>
using namespace std;
int main() {
istringstream a("12 1 4 5");
int j, k, i;
a >> j >> k >> i;
cout << i << endl;
return 0;
}
File deleted
#include <iostream>
#include <sstream>
using namespace std;
int main() {
istringstream flux("12 14.5 13 4");
int j, k, i;
string s;
flux >> j >> k >> s >> i;
cout << k << " " << s << " " << i << endl;
return 0;
}
File deleted
#include <iostream>
#include <sstream>
using namespace std;
int main() {
istringstream a("a bc de f");
string s, s1, s2;
a >> s >> s1 >> s2;
cout << s2 << endl;
return 0;
}
File deleted
#include <iostream>
#include <sstream>
using namespace std;
int main() {
ostringstream flux;
flux << "8+1=" << 8+1;
string s = flux.str();
cout << s.length() << endl;
return 0;
}
File deleted
#include <iostream>
#include <sstream>
using namespace std;
int main() {
istringstream flux("bonjour");
float j;
flux >> j;
if ( flux ) {
cout << "A" << endl;
} else {
cout << "B" << endl;
}
return 0;
}
File deleted
#include <iostream>
#include <sstream>
using namespace std;
int main() {
istringstream flux("1.01 3.02");
int j, k;
flux >> j;
if ( flux ) {
cout << "A" << endl;
} else {
cout << "B" << endl;
}
flux >> k;
if ( flux ) {
cout << "A" << endl;
} else {
cout << "B" << endl;
}
return 0;
}
File deleted
#include <iostream>
#include <fstream>
using namespace std;
int main() {
ifstream flux("xkasflakjsjlkdfjasadffk.zut");
if ( flux ) {
cout << "A" << endl;
} else {
cout << "B" << endl;
}
return 0;
}
File deleted
#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;
}
File deleted
#include <iostream>
using namespace std;
int f(int n) {
return n*n;
}
int main() {
int a = 5;
a - 2;
cout << f(a) << endl;
}
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