//Exercice 1.1 //La valeur de m est 16 //Exercice 1.2 // Le tableau tt vaut {{0},{},{0,1,2},{0,1}} //Exercice 1.3 //La fonction renvoie le tableau {10,5,3,12,7} //Exercice 1.4 //La fonction func renvoie le tableau identique à celui donné //en en arguments //Exercice 2.1 public static int[]diviseurs(int n){ int t=0; for(int i=1;i<=n;i=i+1){ if(n%i==0){ t=t+1; } } int[]div=new int[t]; int p=0; for(int i=1;i<=n;i=i+1){ if(n%i==0){ div[p]=i; p=p+1; } } return div; } //Exercice 2.2 public static int[]diviseursCommuns(int[] tab){ //On cherche le plus petit element de tab int min=tab[0]; for(int i=0;idivc[i]){ max=divc[i]; } } return max; } //Exercice 2.4 public static void plusPetitSommeDiv(int n){ int v=1; int somme=1; while(sommen2){ return true; }else{ return false; } } } //Exercice 3.5 public static boolean present(String[]tab,String st){ for(int i=0;i=tab.length){ ret=new String[tab.length]; for(int i=0;i=vote.length){ return -1; }else{ int cpt=0; for(int j=0;jaimef){ f=j; aimef=cpt; } } return f; } } //Exercice 4.3 public static int[] filmsAimes(int[][] vote,int i){ if(i<0||i>=vote.length){ return new int[0]; }else{ int taille=0; for(int j=0;j