#include <stdio.h>
#include <stdlib.h>
#include <math.h>
void parImpar (int num) {
for (int i = digitos - 1; i >= 0; i--) {
int div = num
/ (int)pow(10, i
); num
= num
% (int)pow(10, i
); printf(div % 2 == 0 ? "\n%d eh Par" : "\n%d eh Impar", div); }
}
int main() {
int num;
printf("Digite um numero inteiro: "); parImpar(num);
}
//https://pt.stackoverflow.com/q/326351/101
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPG1hdGguaD4KCnZvaWQgcGFySW1wYXIgKGludCBudW0pIHsKCWludCBkaWdpdG9zID0gZmxvb3IobG9nMTAoYWJzKG51bSkpKSArIDE7Cglmb3IgKGludCBpID0gZGlnaXRvcyAtIDE7IGkgPj0gMDsgaS0tKSB7CgkgICAgaW50IGRpdiA9IG51bSAvIChpbnQpcG93KDEwLCBpKTsKCSAgICBudW0gPSBudW0gJSAoaW50KXBvdygxMCwgaSk7CiAgICAgICAgcHJpbnRmKGRpdiAlIDIgPT0gMCA/ICJcbiVkIGVoIFBhciIgOiAiXG4lZCBlaCBJbXBhciIsIGRpdik7Cgl9Cn0KCmludCBtYWluKCkgewogICAgaW50IG51bTsKICAgIHByaW50ZigiRGlnaXRlIHVtIG51bWVybyBpbnRlaXJvOiAiKTsKICAgIHNjYW5mKCIlZCIsICZudW0pOwogICAgcGFySW1wYXIobnVtKTsgICAgICAgIAp9CgovL2h0dHBzOi8vcHQuc3RhY2tvdmVyZmxvdy5jb20vcS8zMjYzNTEvMTAx