Skip to content
Snippets Groups Projects
Commit 8b368a9d authored by frederic gruau's avatar frederic gruau
Browse files

modif des nom des deux premieres et 4 nouvelles procedure

parent 7fcdd51a
No related branches found
No related tags found
No related merge requests found
#include <iostream>
#include <vector>
using namespace std;
void blourg(vector<int> t, int v, int i, bool &b) {
i=-1;b=false;
for( int j=0; j<t.size();j++)
if(t[j] == v)
{i=j; b=true;}
}
int main() {bool toto;
vector<int> tab = {4, 10, 13, 7, 5, 6};
int s = 0;
blourg(tab,2,s,toto);
if(toto) cout << s << endl;
else cout << "blourg" << endl;
}
#include <iostream>
#include <vector>
using namespace std;
void blourg(vector<int> t, int v, int i, bool &b) {
i=-1;b=false;
for( int j=0; j<t.size();j++)
if(t[j] == v)
{i=j; b=true;}
}
int main() {bool toto;
vector<int> tab = {4, 10, 13, 7, 5, 6};
int s = 0;
blourg(tab,5,s,toto);
if(toto) cout << s << endl;
else cout << "blourg" << endl;
}
#include <iostream>
#include <vector>
using namespace std;
void blourg(vector<int> t, int v, int &i, bool &b) {
i=-1;b=false;
for( int j=0; j<t.size();j++)
if(t[j] == v)
{i=j; b=true;}
}
int main() {bool toto;
vector<int> tab = {4, 10, 13, 7, 5, 6};
int s = 0;
blourg(tab,5,s,toto);
if(toto) cout << s << endl;
else cout << "blourg" << endl;
}
#include <iostream>
#include <vector>
using namespace std;
void blourg(vector<int> t, int v, int &i, bool &b) {
i=-1;b=false;
for( int j=0; j<t.size();j++)
if(t[j] == v)
{i=j; b=true;}
}
int main() {bool toto;
vector<int> tab = {4, 10, 13, 7, 5, 6};
int s = 0;
blourg(tab,5,s,toto);
if(toto) cout << s << endl;
else cout << "blourg" << endl;
}
//============================================================================
// Name : testCpp.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
using namespace std;
void increment(int n) {
n=n+1;
}
int main() {
int a = 5;
increment(a);
cout << a << endl;
}
//============================================================================
// Name :
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
using namespace std;
void increment(int &n) {
n=n+1;
}
int main() {
int a = 5;
increment(a);
cout << 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