#include #include #include #define NMAX 100000000 int main() { int i = 0, x = 0, length = NMAX; unsigned long long somme = 0; double moy = .0; srand(time(NULL)); for(i = 0; i < length; i++) somme += rand()%100; moy = (double)somme / length; printf( "%.2f\n", moy ); return 0; } /* main() */