Soverein

Untitled

Dec 6th, 2021
682
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int minus = 0;
  9.     const int n = 6;
  10.     int year[n] = { 34356, 38934, 42489, 45563, 51283, 55568 };
  11.     int prirost = 0;
  12.     for (int i = 1; i < n; i++)
  13.     {
  14.         int minus = year[i ] - year[i-1];
  15.         prirost += minus;
  16.     }
  17.     prirost = prirost / 6;
  18.     cout << "sr prirost =  " << prirost<< endl;
  19.     return 0;
  20. }
RAW Paste Data