35 lines
608 B
C
35 lines
608 B
C
|
#include <stdlib.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
int main(void) {
|
||
|
int num = 0;
|
||
|
int i, j;
|
||
|
double comp;
|
||
|
double in;
|
||
|
int doublon;
|
||
|
char revoir;
|
||
|
double* tab = (double*) malloc(sizeof(double));
|
||
|
while(revoir != 'q' || revoir != 'Q'){
|
||
|
printf("case %d : ", num);
|
||
|
scanf("%lf", tab+i);
|
||
|
num++;
|
||
|
printf("quitter ? ");
|
||
|
scanf("%c", &revoir);
|
||
|
printf("\n");
|
||
|
}
|
||
|
for(i=0;i<num;i++){
|
||
|
doublon = 0;
|
||
|
comp=tab[i];
|
||
|
for(j=0;j<num;j++){
|
||
|
if((*(tab+i) == *(tab+j) && (tab+i) != (tab+j))){
|
||
|
doublon = 1;
|
||
|
}
|
||
|
}
|
||
|
if(doublon == 0){
|
||
|
printf("%.2lf, ", comp);
|
||
|
}
|
||
|
}
|
||
|
printf("\n");
|
||
|
free(p);
|
||
|
return EXIT_SUCCESS;
|
||
|
}
|