Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ifstream f("numere.txt");
- int main()
- {
- int n, min1 = 100, min2 = 100, i, a, b,ok=0;
- f >> n;
- for (i = 0, i < n;i++;)
- {
- f >> a >> b;
- while (a < 100 && b < 100 && a<b)
- {
- ok=1;
- if(ok==0)
- {
- cout<<"0";
- }
- if (a < min1)
- {
- min1 = a;
- min2 = b;
- }
- }
- }
- if (min1 < min2)
- {
- cout << min1 << " " << min2;
- else
- cout << min2 << min1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement