All pastes #386512 Raw Edit

Mine

public text v1 · immutable
·published 2007-03-08 17:59 UTC
rendered paste body
void main (void) {
	int i,i2;
	int cool=1;
		
	t_emetteur * tab_emet[NB_EMET];
	int tab_emet_suc[NB_EMET]={0};
	
	srand(time(0)); rand();
	
	for(i=0; i < NB_EMET ; ++i){
		
		if(tab_emet[i]=init_emet(NB_DISTRIB, K_DISTRIB))
			return 0;
		
	}
	
	while (cool){
	
		for(i=0;i<NB_EMET;++i){
			if(tab_emet[i]->hors_service){
				while(succes_emetteur(tab_emet[i])){
					tab_emet_suc[i]+=1;
					
					for (i2=0; i<NB_EMET;++i){
					
						toc_emetteur( tab_emet[i] );
					}					
				}
			}
			
			for(i=0,cool=0; i < NB_EMET; ++i){
				if(!(tab_emet[i]->hors_service)){
					cool=1;
				}
			}
			
		}
	}
}