#include<stdio.h>
int main()
{
int i ,n ,sum=0;
printf("enter the number\n");
scanf("%d",&n);
for(i=0; i<=n; i++)
{
if (i%2==0)
{
sum=sum+i;
}
}
printf("sum of all prime number between entered number is :%d\n",sum);
}
output:
enter the number
10
sum of all prime number is between entered number is :30