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 posledna_cifra_na_x = x % 10;
- int posledna_cifra_na_y = y % 10;
- cout << posledna_cifra_na_x + posledna_cifra_na_y << endl;
- return 0;
- }
- // 12345 / 10 = 1234, остаток 5
- // 67123 / 10 = 6712, остаток 3
Advertisement
Add Comment
Please, Sign In to add comment