henry 0 Posted November 6, 2019 Report Share Posted November 6, 2019 Olá, sou um principiante na linguagem Python e estou com dificuldade para converter este código para o Python. Eu não farei uso do Python para o futuro, porém preciso excepcionalmente deste código em Python. Existe algum conversor Online para isso? Agradeço. O código: #include <stdio.h> int main(void) { int pos[3], neg[3], posCount = 0, negCount = 0; for (int i = 0; i < 3; i++) { int valor; printf("Informe um valor: "); scanf("%d", &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); printf("\nOs números negativos digitados foram: "); for (int i = 0; i < negCount; i++) printf("%d ", neg); Link to post Share on other sites
M6 150 Posted November 6, 2019 Report Share Posted November 6, 2019 Não existe nenhum conversor online. Aliás, duvido que exista algum conversor. 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar." Link to post Share on other sites
PsySc0rpi0n 18 Posted November 10, 2019 Report Share Posted November 10, 2019 E não me parece muito difícil fazer isso em Python mesmo sem saber Python. Basta ler um pouco sobre o mais básico sobre Python e o resto deverá ser apenas seguir o code C. Não eve mudar muito. Kurt Cobain - Grunge misses you Nissan GT-R - beast killer Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now