SlideShare a Scribd company logo
#include<iostream.h>
#include<conio.h>
void main()
{
int n,i,j,isprime,sum=0;
clrscr();
cout<<"Find sum of all between 1 to";
cin>>n;
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)
{ z
sum+=i;
}
}
cout<<"Result is:"<<sum;
getch();
}

More Related Content

TXT
N primo clase programa
DOC
Sources
DOC
Doi xung mang mot chieu
DOC
IMPLEMENTATION OF AUTO KEY IN C++
PDF
contoh Program C++ tentang fungsi for
PDF
Oopsprc1d
PDF
Corridas
N primo clase programa
Sources
Doi xung mang mot chieu
IMPLEMENTATION OF AUTO KEY IN C++
contoh Program C++ tentang fungsi for
Oopsprc1d
Corridas

What's hot (16)

PDF
Slides
 
DOCX
Programacion
DOCX
Luis cuñas programacion
DOC
Scanfill polygon
TXT
Practica 4 errores
 
PPTX
Corridas de los programas
DOCX
Rafaeltorres
TXT
Funcion num a letras
DOC
Correcion
TXT
Convertir numero a letras.
PDF
07 5 반복문(break,contine).key
PDF
Michell abecedario
PDF
Bubble sort
PDF
bai tap-loi-giai-ngon-ngu-lap-trinh-c
PDF
2012 December Supervisor of the Month Nominee
DOCX
Slides
 
Programacion
Luis cuñas programacion
Scanfill polygon
Practica 4 errores
 
Corridas de los programas
Rafaeltorres
Funcion num a letras
Correcion
Convertir numero a letras.
07 5 반복문(break,contine).key
Michell abecedario
Bubble sort
bai tap-loi-giai-ngon-ngu-lap-trinh-c
2012 December Supervisor of the Month Nominee
Ad

More from Ankit Dubey (20)

PDF
Unit 1 android and it's tools quiz {mad cwipedia}
PDF
Scheduling
PDF
Chapter 4
PDF
Chapter 3
PDF
Chapter 2
PDF
Chapter 1
PDF
Chapter 5
PDF
Ch5 cpu-scheduling
PDF
Ch4 threads
PDF
Ch3 processes
PPT
Ch2 system structure
PPT
Ch1 introduction-to-os
PDF
Android i
PDF
Mongodb mock test_ii
PDF
Android mock test_iii
PDF
Android mock test_ii
PDF
Ajp notes-chapter-06
PDF
Ajp notes-chapter-05
PDF
Ajp notes-chapter-04
PDF
Ajp notes-chapter-03
Unit 1 android and it's tools quiz {mad cwipedia}
Scheduling
Chapter 4
Chapter 3
Chapter 2
Chapter 1
Chapter 5
Ch5 cpu-scheduling
Ch4 threads
Ch3 processes
Ch2 system structure
Ch1 introduction-to-os
Android i
Mongodb mock test_ii
Android mock test_iii
Android mock test_ii
Ajp notes-chapter-06
Ajp notes-chapter-05
Ajp notes-chapter-04
Ajp notes-chapter-03
Ad

Ooprc3b