Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int x;
- int y;
- cin >> x;
- cin >> y;
- int sredna_cifra_na_x = (x / 10) % 10;
- int sredna_cifra_na_y = (y / 10) % 10;
- cout << sredna_cifra_na_x + sredna_cifra_na_y << endl;
- // 321 / 10 = 32
- // 32 % 10 = 2
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment