Advertisement
icatalin

Tema varianta 2 sub 1

Nov 26th, 2013
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1.  
  2.  
  3. Varianta 2.
  4. Subiect 1.
  5. Exercitiu 1.
  6. d. x*x==y*y
  7. Exercitiu 2.
  8. a) 2,2,1,1,7,7,5
  9. b)
  10. c) repeta... pana cand (x==0)
  11. d) #include <iostream>
  12.  
  13. using namespace std;
  14.  
  15. int main()
  16. { int x,y,;
  17. cout<<"x="<<endl;
  18. cin>>x;
  19. while (x){
  20. cout<<"y="<<endl;
  21. cin>>y;
  22. if (x>y){
  23. cout<<x%10;
  24. else
  25. cout<<y%10;
  26. }
  27. x=y;
  28.  
  29. }
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement