#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#include<ctype.h>

int main()
{
    setlocale(LC_CTYPE,"spanish");
    char materia[50];
    char otro;
    float calif,total,acum=0;
    int contaRp=0;
    int contap=0;
    int mat=0;
    
    
    printf("MATERIAS CURSADAS DEL SEMESTRE\n");

    do {
        printf("Ingrese el nombre de la materia:");
        scanf("%[^\n]",materia);
        do {
            printf("Ingrese calificacion:");
            scanf("%f",&calif);
            if (calif<0 || calif>10)
            {
                printf("Calificacion incorrecta\n");
                printf("INgrese una calificacion valida:");
                scanf("%f",&calif);
                
            }
        } while (calif<0 || calif>10);

        if (calif<6) 
        {
            contaRp++;
            
        }
        else
        {
            contap++;
        }
        mat++;
        acum+=acum;

        printf("¿Curso mas materias?:s/n\n");
        scanf("%c",&otro);
        otro=toupper(otro);
    } while (otro=='S');

    total=(acum/mat);

    system("cls");
    printf("MATERIAS APROBADAS: %d\n",contap);
    printf("MATERIAS REPROBADAS: %d\n",contaRp);
    printf("MATERIAS CURSADAS: %d\n",mat);
    printf("PROMEDIO FINAL:%.2f",total);
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: