gabriel foloni
gabriel foloni

Reputation: 9

my ubuntu wine cannot run properly my code

I have wine-9.19 (staging) and I have a code with 2 files .C and a file .h in this code I need to scan 10 numbers and print theses numbers, but when I compile with my terminal using wine I put "1" and this " 0 0 0 0 0 260713200 31326 -1712664256 32765" appears immediately.

I have another code and it worked properly, so I thought that's the code, but i tried in onlinegdb, and it works, so I really dont know what's going on.

#include <stdio.h>
#include "function.h"
int main (){
    int vetor[10];
    reading(vetor);
    printing(vetor);
    return 0;
}

thats my ordenacao.c


#include <stdio.h>
#include "function.h"

void reading (int vetor[]){
    printf ("digite 10 numeros\n");
    for (int i = 0; i < 10; i-=-1){
        scanf ("%d", &vetor[i]);
    }
    return;
}

void printing (int vetor[]){
    for (int i = 0; i < 10; i-=-1){
        printf ("%d ", vetor[i]);
    }
    return;
}

thats my function.c

void reading(int *vetor);
void printing(int vetor[]);

and thats my function.h

Upvotes: 0

Views: 54

Answers (0)

Related Questions