Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Varianta 1.
- Subiect 1.
- Exercitiu 1.
- d. (x<=8) && (x>5)
- Exercitiu 2.
- a) 963
- b) 61,65,67
- c) repeta
- instructiuni
- pana cand ( n )
- d)
- #include <iostream>
- using namespace std;
- int main()
- { int n,z=0,p=1,c;
- cout<<"n="<<endl;
- cin>>n;
- while (n){
- c=n%10;
- n=n/10;
- if (c%3==0){
- z=z+p*(9-c);
- p=p*10; }
- }
- cout <<"z="<<z;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement