First commit
This commit is contained in:
39
IUT/Info1/TD/Exercices/10.5_tableau_boucle/main.cpp
Normal file
39
IUT/Info1/TD/Exercices/10.5_tableau_boucle/main.cpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "tableaux.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
const unsigned int taille_reelle1 = 1000;
|
||||
unsigned int taille_pratique1;
|
||||
unsigned int tab1[taille_reelle1];
|
||||
|
||||
const unsigned int taille_reelle_copie_1 = 1000;
|
||||
unsigned int taille_pratique_copie1;
|
||||
unsigned int tab1_copie[taille_reelle_copie_1];
|
||||
|
||||
const unsigned int taille_reelle2 = 1000;
|
||||
unsigned int taille_pratique2;
|
||||
unsigned int tab2[taille_reelle2];
|
||||
|
||||
taille_pratique1 = saisie_entiers(tab1, taille_reelle1);
|
||||
taille_pratique_copie1 = taille_pratique1;
|
||||
|
||||
copie(tab1, tab1_copie, taille_pratique1, taille_reelle_copie_1);
|
||||
afficher_tableau(tab1_copie, taille_pratique_copie1);
|
||||
|
||||
taille_pratique2 = saisie_entiers(tab2, taille_reelle2);
|
||||
cout << "tab1 et tab2 sont identiques : "
|
||||
<< sont_identiques(tab1, tab2, taille_pratique1, taille_pratique2)
|
||||
<< endl;
|
||||
|
||||
cout << "La moyenne de tab1 est : "
|
||||
<< moyenne_tableau(tab1, taille_pratique1)
|
||||
<< endl;
|
||||
|
||||
somme_cumulee(tab1_copie, taille_pratique_copie1);
|
||||
afficher_tableau(tab1_copie, taille_pratique_copie1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user