You are on page 1of 1

#include "iostream.h" #include "math.

h" using namespace std; int i,t,cont=0,j=0; int main(){ cout<<"NUMEROS PRIMOS :"<<endl; cout<<endl; for(t=3;t<=130;t++){ cont=0; for(i=1;i<=t;i++){ if(t%i==0) cont++; } if(cont==2){ j++; cout<<" "<<t<<endl; } } cout<<endl; cout<<" ESTOS SON LOS PRIMEROS "<<j<<" NUMEROS PRIMOS "<<endl; cout<<endl; system("pause"); return 0; }