#include <stdio.h>
int main(void) {
int pos[3], neg[3], posCount = 0, negCount = 0;
for (int i = 0; i < 3; i++) {
int valor;
if (valor < 0) neg[negCount++] = valor;
else pos[posCount++] = valor;
}
printf("Os números positivos digitados foram: "); for (int i
= 0; i
< posCount
; i
++) printf("%d ", pos
[i
]); printf("\nOs números negativos digitados foram: "); for (int i
= 0; i
< negCount
; i
++) printf("%d ", neg
[i
]); }
//https://pt.stackoverflow.com/q/318502/101
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CglpbnQgcG9zWzNdLCBuZWdbM10sIHBvc0NvdW50ID0gMCwgbmVnQ291bnQgPSAwOwoJZm9yIChpbnQgaSA9IDA7IGkgPCAzOyBpKyspIHsKCQlpbnQgdmFsb3I7CgkgICAgcHJpbnRmKCJJbmZvcm1lIHVtIHZhbG9yOiAiKTsKCSAgICBzY2FuZigiJWQiLCAmdmFsb3IpOwoJICAgIGlmICh2YWxvciA8IDApIG5lZ1tuZWdDb3VudCsrXSA9IHZhbG9yOwoJICAgIGVsc2UgcG9zW3Bvc0NvdW50KytdID0gdmFsb3I7Cgl9CglwcmludGYoIk9zIG7Dum1lcm9zIHBvc2l0aXZvcyBkaWdpdGFkb3MgZm9yYW06ICIpOwoJZm9yIChpbnQgaSA9IDA7IGkgPCBwb3NDb3VudDsgaSsrKSBwcmludGYoIiVkICIsIHBvc1tpXSk7CglwcmludGYoIlxuT3MgbsO6bWVyb3MgbmVnYXRpdm9zIGRpZ2l0YWRvcyBmb3JhbTogIik7Cglmb3IgKGludCBpID0gMDsgaSA8IG5lZ0NvdW50OyBpKyspIHByaW50ZigiJWQgIiwgbmVnW2ldKTsKfQoKLy9odHRwczovL3B0LnN0YWNrb3ZlcmZsb3cuY29tL3EvMzE4NTAyLzEwMQ==