Untitled
unknown
plain_text
2 years ago
740 B
9
Indexable
#include <stdio.h>
#include <math.h>
int main()
{
int n, s;
scanf("%d", &n);
int c1 = 1;
int c2 = 10;
int count = 0;
int i = 0;
int b = 0;
int temp = 0;
while (i != 1) {
s = n / c1;
if (s < 10) {
i = 1;
}
c1 *= 10;
count++;
}
c2 = pow(c2, count-1);
while (count != 0) {
temp = n / c2;
n = n % c2;
c2 /= 10;
if (temp % 2 != 0) {
printf("True");
break;
}
count--;
}
if (count == 0) {
printf("False");
}
return 0;
}Editor is loading...