Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Mar 31st, 2020 68 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.     int i;
  10.     double n;
  11.     double priemer, sum = 0, suma = 0, priemerrozdielu;
  12.     double cisla[MAX_LENGTH + 1];
  13.     double rozdiel[MAX_LENGTH + 1];
  14.    
  15.    
  16.     printf("Zadaj pocet prvkov pola: ");
  17.     scanf("%lf", &n);
  18.  
  19.     printf("Zadaj %lf prvkov v poli: ", n);
  20.  
  21.     for (i = 0; i < n; i++) {
  22.         scanf("%lf", &cisla[i]);
  23.         suma += cisla[i];
  24.     }
  25. priemer =suma / n; 
  26.  
  27. for (i = 0; i < n; i++) {
  28.     rozdiel[i] = cisla[i] - priemer;
  29.         sum += abs( rozdiel[i]);
  30. }
  31.  
  32. priemerrozdielu =sum / n;
  33.  
  34.  
  35. printf("priemer odchylok je = %lf,", priemerrozdielu);
  36. return 0;
  37.  
  38. }
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