Advertisement
Guest User

bautura si manele

a guest
Dec 10th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4. ifstream Gigi ("minimdoua.in");
  5. ofstream Marcel ("minimdoua.out");
  6. int main()
  7. {int i,min1=1000001,min2=1000001,n,nr;Gigi>>n;for (i=0;i<n;i++){Gigi>>nr;if ((nr<min1)&&(nr%10==(nr/10)%10)){min2=min1;min1=nr;}else{if((nr<min2)&&(nr%10==(nr/10)%10)){min2=nr;}}}if(min2==1000001){Marcel<<"numere insuficiente";}else {Marcel<<min1<<" "<<min2;}return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement