Preview:
// Online C compiler to run C program online
#include <stdio.h>
#include <stdbool.h>

int main() {
    int n =10;
    bool flag = true;
    for(int i = 2; i < 5; i++){
        if(n%2==0){
            flag = false;
        }
    }
    if(flag==true){
        printf("This number is a prime number: %d", n);
    }
    else if(flag==false){
        printf("This number is not a prime number: %d", n);
    }
    
    return 0;
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter