Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int i;
- int x;
- int min;
- int max;
- cout << "Podaj liczbe:" << endl;
- cin >> x;
- min = x;
- max = x;
- while (x != 0)
- {
- if (min > x)
- min = x;
- if (max < x)
- max = x;
- cin >> x;
- }
- cout << "Wartosc maksymalna wynosi: "<< max << endl;
- cout << "Wartosc minimalna wynosi: "<< min << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement