Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1.
- 8820
- 2.
- 2, 4
- 3.
- #include <iostream>
- using namespace std;
- int main() {
- int n, x, m, p;
- cin >> n;
- x = 0, m = 0, p = 1;
- while (x < 10) {
- int cn = n;
- while (cn != 0) {
- int c = cn % 10;
- cn /= 10;
- if (c == x) {
- m = c * p + m;
- p *= 10;
- }
- }
- x += 2;
- }
- cout << m << endl;
- return 0;
- }
- 4.
- ...
- repeta
- ...
- pana cand cn = 0
- ...
Add Comment
Please, Sign In to add comment