#include <stdio.h>
int main() {
    float cgpa;

    printf("Enter your CGPA: ");
    scanf("%f", &cgpa);

    switch ((int)cgpa) {
        case 8:
            printf("You got 8 CGPA.\n");
            break;
        case 10:
            printf("You got 10 CGPA.\n");
            break;
        case 7:
            printf("You got 7 CGPA.\n");
            break;
        default:
            printf("Your CGPA is not 7, 8, or 10.\n");
    }

    return 0;
}

Embed on website

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