Advertisement
icatalin

Tema varianta 1 sub 1

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