TOPIC

Presentation Error (15%)

flustosa1 asked 3 years ago

#include <stdio.h>

int main(){
  int x[10], i;

    for(i=0; i<10; i++){
        scanf("%d", &x[i]);
        if(x[i] <= 0){
            x[i] = 1;
        }
    }

    for(i=0; i<10; i++){
        printf("x[%d] = %d\n", i, x[i]);
    }

    return 0;
}

Remember not post solutions. Your post may be reviewed by our moderators.

  • HenriqueNawa replied 3 years ago

    A saída tem que ser igual ao apresentado, no seu caso o x está minusculo sendo o correto ser maiusculo