Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int suma=0, maxim=0, minim=999999999;
- for (int i=1; i<=999999999;++i)
- {
- int x;
- cin >> x;
- suma=suma+x;
- if (x>=maxim)
- x=maxim;
- if (x<=minim)
- x=minim;
- }
- cout << suma <<'\n'<<maxim<<'\n'<<minim;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement