# include<stdio.h>
# include<stdlib.h>
# include<time.h>
// Mohammad Rahime
main()
{
int vett[10];
int i=0;
float media=0;
srand(time(0));
i=rand()%10;
for(i=0;i<10;++i)
{
media+=vett[i];
//printf("La media e %f\n",media);
}
media=media/10;
printf("La media e %2.f\n",media);
system("pause");
}
# include<stdlib.h>
# include<time.h>
// Mohammad Rahime
main()
{
int vett[10];
int i=0;
float media=0;
srand(time(0));
i=rand()%10;
for(i=0;i<10;++i)
{
media+=vett[i];
//printf("La media e %f\n",media);
}
media=media/10;
printf("La media e %2.f\n",media);
system("pause");
}
Nessun commento:
Posta un commento