#include<stdio.h>
int main(){
    int n=10,i,sum=0,j,isPrime=1 ;
     for(i=2; i<=n; i++)
    {
        isPrime = 1;
        for(j=2; j<=i/2 ;j++)
        {
            if(i%j==0)
            {
            
                isPrime = 0;
                break;
            }
        }

        
        if(isPrime==1)
        {
            sum += i;
        }
    }

    
    printf("%d",sum);
}

Embed on website

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