Advertisement
anamariakiss1

ogl cu cx stgruct

Nov 11th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include<fstream>
  3. using namespace std;
  4. struct {int x,y;}v[100];
  5. ifstream f("perechi.txt");
  6. int main()
  7. { int n,cx,ogl,i;
  8. f>>n;
  9. for(i=0;i<n;i++)
  10. {
  11. ogl=o;
  12. cx=v[i].x;
  13. while(x)
  14. {
  15. ogl=ogl*10+cx%10;
  16. cx/=10;
  17. }
  18. if(ogl==v[i].y)
  19. cout<<v[i].x<<' '<<v[i].y<<endl;
  20. }
  21.  
  22.  
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement