Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- #include <string>
- #include <math.h>
- #include <algorithm>
- #include <vector>
- using namespace std;
- int main()
- {
- int c, a, i,o,p;
- cin >> a;
- c = 0;
- c = a % 1000 + 1;
- i = a % 1000 - 1;
- a = a / 1000;
- if (c % 10 + (c % 100) / 10 + c / 100 == a % 10 + (a % 100) / 10 + a / 100 || i % 10 + (i % 100) / 10 + i / 100 == a % 10 + (a % 100) / 10 + a / 100)
- cout << "Yes";
- else
- cout << "No";
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment