Ejemplo n.º 1
0
int main()
{
	affiche_tab(tab);
	affiche_tab2(tab2);
	//affiche_tab2((int(**)) tab);
	//affiche_tab((int(*)[4])tab2);
	return 0;
}
Ejemplo n.º 2
0
// MAIN
int main()
{	
	int a,b;
	TABLEAU jean;
	/*printf("%lu \n", sizeof(TABLEAU));*/
	srand(time(NULL));
	jean= init_tab(jean);
	affiche_tab(jean);
	a = multi( jean);
	b = min(jean);
	printf("produit : %d, min : %d \n ", a,b);
	jean = decalage(jean);
	affiche_tab(jean);
	printf("\n");
	jean = trirapide(jean, 0, jean.taille);
	affiche_tab(jean);
	return 0;
}
Ejemplo n.º 3
0
Archivo: 2.c Proyecto: Eastkap/1I002
void histogramme(int tab[], int h[], int taille){
	int i,j,c=0;
	for( i=0; i<taille; i++){
		for( j=0; j<taille; j++){
			if(tab[i] == tab[j]){
				c++;
			}
		}
		h[i] = c;
		c=0;
	}
	affiche_tab(h,taille);
}
Ejemplo n.º 4
0
void crypter_mess(char * mess, cle publique, cle prive)
{
   int * crypted = creer_tab( strlen(mess) ); /*tableau d'entier de taille du message*/
   int i=0;

   while(mess[i] != '\0')
   {
      crypted[i] = chiffrer_c( mess[i] , publique.y, publique.x);
      i++;
   }

   affiche_tab(crypted, strlen(mess));
}
Ejemplo n.º 5
0
Archivo: 2.c Proyecto: Eastkap/1I002
int  init_tab(int tab[], int taille){
	int i,val=0,c=0;
	for(i=0;i<taille;i++){
		printf("Veuillez saisir une valeur ");
		scanf("%d",&val);
		if(val<0){
			i=taille+1;
		}else{
		tab[i] = val;
		c++;
		}
	}
	affiche_tab(tab,c);
	return c;
}
Ejemplo n.º 6
0
Archivo: main.c Proyecto: bechea/tp_c
/*Ce programme a pour but d'apprendre/comprendre 
 *la gestion des nombres aléatoires et des tableaux
 *de plus un histogramme est réalisé
 */
int main()
{
	int tab[DIM_TAB];
	int histo[VAL_MAX];
	int i;

	/*Init histogramme*/
	for(i = 0 ; i < VAL_MAX ; i++) histo[i] = 0;

	srand(time(NULL));/*Création de la seed*/

	init_alea_tab(tab);/*fonction d'init du tableau aléatoire*/
	histogramme(tab,histo);/*création de l'histogramme*/

	printf("Premier tableau :\n");
	affiche_tab(tab);
	affiche_histo(histo);

	return EXIT_SUCCESS;
}