#include <stdio.h>

void main() {
    int n, max = 0;

    printf("Berapa banyak data yang ingin di masukkan? \n");
    scanf("%d", &n);

    int number[n];

    for (int i = 0; i < n; i++) {
        printf("Masukkan data ke-%d: \n", i + 1);
        scanf("%d", &number[i]);
    
        if (number[i] > max)
            max = number[i];
    }

    printf("Data dengan nilai terbesar adalah %d", max);
}

Embed on website

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