Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- int a, b;
- scanf("%d%d", &a, &b);
- int pomal, pogolem;
- if(a < b) {
- pomal = a;
- pogolem = b;
- }
- else {
- pomal = b;
- pogolem = a;
- }
- int pozicija = 1;
- int parno_slicen = 1;
- while(pogolem > 0) {
- int cifra = pogolem % 10;
- if(pozicija % 2 == 0) {
- int pomal_cifra = pomal % 10;
- if(cifra == pomal_cifra) {
- }
- else {
- parno_slicen = 0;
- }
- pomal /= 10;
- }
- pogolem /= 10;
- pozicija++;
- }
- printf("%d\n", parno_slicen);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement