SelinD

59/132

Jun 25th, 2019
44
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. //ifstream fin1("f1.txt");
  4. //ifstream fin1("f2.txt");
  5. double v1[100],v2[100];
  6. int main()
  7. {
  8. int i,n1=0,n2=0
  9. double x1,x2;
  10. while(fin>x1)
  11. {
  12. v[++n1]=x1;
  13. }
  14. while(fin>x2)
  15. {
  16. v[++n2]=x2;
  17. }
  18.  
  19. for(i=1;i<=n1;i++)
  20. {
  21. for(j=1;j<=n2;j++)
  22. {
  23. if(v1[i]==v2[j])
  24. {
  25. cout<<v1[i]<<" ";
  26. }
  27. }
  28. }
  29. }
Add Comment
Please, Sign In to add comment