2
I have to read infinite averages of students and if they are greater than or equal to 7 the student is approved , if not, he is flunked , and if I type -1 the program to and sends a message of completion.
I’m trying to make this program difficult and also wanted to add something that says when the user type something that is not between 0 and 10 (which are the possible student grades) but I’m not getting.
    printf("Digite a media final do aluno");
    scanf("%d",&media);
    if(media>=0 && media<=10)
    while(media!=-1)
    {
    if(media>=7)
    printf(" APROVADO! \n");
    printf("Media do proximo aluno: \n");
    scanf("%d",&media);
    else {
    printf(" REPROVADO! \n");
    printf("Media do proximo aluno: \n");
    scanf("%d",&media);}
    }
    printf("Fim do programa! \n"); // quando eu digito -1
    else
    printf("Voce digitou numero invalido ");
    system("PAUSE");
    return 0;
this missing a %d in the first scanf this just d
– Willian Lima
ah yes , nor realized but I think it was not only this error rsrs
– Vitor Gonçalves
In fact they had a few more things, but that’s what I saw right away
– Willian Lima