#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main() {
int i,n,max,min;
printf("donner la taille de tableau:");
scanf(" %d",&n);
float T[n];
for (i=0;i<n;i++)
{
printf("enter l'élement némuro%d:",i);
scanf("%f",&T[i]);
}
min=T[0];
max=T[0];
for(i=1;i<n;i++){
if(T[i]<min){
min=T[i];}
else if(T[i]>max)
{max=T[i];
}}
printf("le min element est:%d\n",min);
printf("le max element est:%d",max);
return 0;
}


إرسال تعليق