All pastes #629970 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-07-22 20:29 UTC
rendered paste body
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>

int main() {
        int i, j, left_check, test, final_check;
        float right_check;
        char NumberString[3], string_new[3];
        i = 999;
        j = 999;
        while(j>100) {
                test = i * j;
                left_check = test * .001;
                right_check = ((test * .001) - left_check) * 1000;
                snprintf(NumberString, 3, "%d", right_check);
                string_new[0] = NumberString[2];
                string_new[1] = NumberString[1];
                string_new[2] = NumberString[0];
                final_check = atoi(string_new);
                if(final_check = left_check) {
                        printf("Palindromic Number = %d\n", i*j);
                        }
                j--;

        }

        return 0;
}