Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
740 B
3
Indexable
Never
#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;
}