Created
October 4, 2014 15:13
-
-
Save shohan4556/97ec5b5fd00423a5205e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int i,j; | |
int long long sum=0; | |
int const long long num=2000000; | |
for(i=1;i<=num;i++){ | |
for(j=2;j<i;j++){ | |
if(i%j==0) | |
break; | |
} // child loop | |
if(i==j) | |
sum=sum+i; | |
} // parrent loop | |
printf(" The sum of prime Number below %lld is %lld \n\n",num,sum); | |
} //end main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment