First commit
This commit is contained in:
26
IUT/Info1/TD/Exercices/10.6/main.cpp
Normal file
26
IUT/Info1/TD/Exercices/10.6/main.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "tab.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
const unsigned int nb_lignes = 4;
|
||||
const unsigned int nb_colonnes = 6;
|
||||
unsigned int tab[nb_lignes][nb_colonnes] = {
|
||||
{2, 3, 5, 7, 11, 13},
|
||||
{17, 19, 23, 29, 31, 37},
|
||||
{41, 43, 47, 53, 59, 61},
|
||||
{67, 71, 73, 79, 83, 89}
|
||||
};
|
||||
|
||||
afficher_tableau(tab, nb_lignes, nb_colonnes);
|
||||
|
||||
permutation_lignes(tab, 0, 2, nb_lignes, nb_colonnes);
|
||||
|
||||
afficher_tableau(tab, nb_lignes, nb_colonnes);
|
||||
|
||||
permutation_colonnes(tab, 1, 4, nb_lignes, nb_colonnes);
|
||||
|
||||
afficher_tableau(tab, nb_lignes, nb_colonnes);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user