Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int encriptvars(int x, int y)
- {
- assert(x < 10 && y < 10);
- int e = x * 100 + y;
- return e;
- }
- pair<int, int> extract(int e)
- {
- int x = e / 100;
- int y = e % 100;
- return make_pair(x, y);
- }
- int main()
- {
- int e = encriptvars(2, 9);
- cerr << e << endl;
- pair<int, int> p = extract(e);
- cerr << p.first << ' ' << p.second;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement