Advertisement
catalyn

a si b 25.09

Sep 25th, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. using namespace std;
  2. ifstream f("date.in");
  3. ofstream g("date.out");
  4. int main()
  5. {
  6. int a,b,cifa,cifb,v[100],i,j,nr;
  7. f>>a>>b;
  8. while(a)
  9. {
  10. cifa=a%10;
  11. a/=10;
  12. nr++;
  13. }
  14. while(b)
  15. {
  16. cifb=b%10;
  17. b/=10;
  18. nr++;
  19. }
  20. for(i=1;i<=nr;i++)
  21. {for(j=1;j<=nr;j++)
  22. {if( (i%2==0 && j%2==0) && i>j )
  23.  
  24.  
  25. g<<a<<" ";
  26. else
  27. g<<b;}}
  28. return 0;
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement