[Solved] C – Counting Numbers {making a program} [closed]


#include <stdio.h>

int main(void){
    int T;

    scanf("%d", &T);
    for(int i = 1; i <= T; ++i){
        int marks[101] = {0};
        int max = -1;
        int n, mark;
        scanf("%d", &n);
        for(int j = 0; j < n; ++j){
            scanf("%d", &mark);
            if(mark > max)
                max = mark;
            ++marks[mark];
        }
        printf("case %d : max = %d, frequency = %d\n", i, max, marks[max]);
    }

    getchar(); 
    return 0;
}

2

solved C – Counting Numbers {making a program} [closed]