Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Mar 31st, 2020 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #pragma warning(disable:4996)
  2. #define MAX_LENGTH 100
  3. #include<stdio.h>
  4. #include <math.h>
  5.  
  6. int main()
  7.  
  8. {
  9.     double i, n;
  10.     double priemer, sum = 0.0; suma = 0.0, priemerrozdielu;
  11.     double cisla[MAX_LENGTH + 1];
  12.     double rozdiel[MAX_LENGTH + 1];
  13.    
  14.    
  15.     printf("Zadaj pocet prvkov pola: ");
  16.     scanf("%lf", &n);
  17.  
  18.     printf("Zadaj %lf prvkov v poli: ", n);
  19.  
  20.     for (i = 0; i < n; i++) {
  21.         scanf("%lf", &cisla[i]);
  22.         suma += cisla[i];
  23.     }
  24. priemer =suma / n; 
  25.  
  26. for (i = 0; i < n; i++) {
  27.     rozdiel[i] = cisla[i] - priemer;
  28.         sum += abs( rozdiel[i]);
  29. }
  30.  
  31. priemerrozdielu =sum / n;
  32.  
  33.  
  34. printf("priemer odchylok je = %lf,", priemerrozdielu);
  35. return 0;
  36.  
  37. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top