Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a, b, x;
- a = 0;
- b = 0;
- x = 10;
- do
- {
- if(x%2 == 0)
- {
- b++;
- a+=x;
- }
- x++;
- }while(x < 31);
- a/=b;
- cout << "Wynik średniej arytmetycznej wynosi: " << a;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment