convertisseur python à c

num = input()
xzoj = 0
zoj = 0
fard = 0 
xfard = 0
for i in range(len(num)):
    if int(num[i]) % 2 ==0:
        xzoj +=1
        zoj += int(num[i])
    else :
        xfard +=1
        fard +=int(num[i])
print(zoj / xzoj)
print(fard / xfard)
Open Owl