Home
Posts RSS
Comments RSS
Edit
Programs
Search & Find out
Thursday, December 3, 2009
Sum of prime numbers
,
Author:
Raviteja
|
Filed Under:
c
|
#include "stdio.h"
#include "conio.h"
void main ()
{
int i,n,R,m;
clrscr ();
printf("Enter a no. to find out all Prime no.: ");
scanf("%d",&m);
for (n=1;n<=m;n++)
{
for (R=2;R
{
if (n%R==0)
{
break;
}
}
if (R==n)
{
printf ("%d\t",n);
}
}
getch ();
}
Download the executable (.exe) file for this program..
download
0 comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
StoresnOffers.com
Find the best Local Offers, Stores from Stores, Restaurants, Malls and Supermarkets near you. Follow us to get Latest Deals & Offers
http://www.storesnoffers.com
Like Facebook Page
Popular Posts
Labels
c
(57)
c#
(1)
c++
(20)
Blog Archive
Blog Archive
November (1)
December (52)
November (22)
About Me
Raviteja
View my complete profile
My Blog List
Term of Use
0 comments:
Post a Comment