Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int n, x,a=1;
- double srednia;
- int main()
- {
- cout << "Podaj liczbe n: " << endl; cin >> n;
- for(int i = 1; i<=n; i++)
- {
- cout << endl;
- cout << "Podaj liczbe n:" << endl; cin >> x;
- cout << endl;
- srednia = (n+x)/a++;
- cout << endl;
- cout << srednia;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement