Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int x, y[10000], z, i;
- int main()
- {
- cout << "Podaj ilosc liczb (minimum 3)" << endl;
- cin >> x;
- for (i = 0; i < x; i++)
- {
- cout << "Podaj " << i+1 << " liczbe" << endl;
- cin >> y[i];
- }
- z += y[1] + y[x-2];
- cout << "Srednia wynosi " << z / 2 << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement