What's new

Hi sino po mag volunteer tumulong sa C problem ko

anong problem ba, dapat pinost mo na.

Screenshot (432).png


ayan po

C:
#include <stdio.h>

#define rSize 3
#define cSize 4

void accScores(int scores[rSize][cSize]){
    int row, col;
    
    for(row = 0; row < rSize; row++){
        printf("\nStudent %d:\n", row+1);
        for(col = 0; col < cSize; col++){
            printf("Quiz %d: ", col+1);
            scanf("%d", &scores[row][col]);
        }
    }
}

void scoresDisplay(int scores[rSize][cSize]){
    int row, col;
    
    for(row = 0; row < rSize; row++){
        printf("\nStudent %d: \n", row+1);
        for(col = 0; col < cSize; col++){
            printf("\nQuiz %d: %d\n", col+1, scores[row][col]);
        }
    }
    printf("\n");
}


main(){
    int scores[rSize][cSize];
    int type;
    
    printf("Input the scores of 3 students in the 4 quizzes;");
    accScores(scores);
    
    printf("Scores of all students:\n\n");
    scoresDisplay(scores);
}



yung kulang nalang po yung following tasks: pati yung menu driven
 

Attachments

Last edited:

Similar threads

Back
Top