Nun hab ich den Fehler gefunden war natürlich nur ein ganz kleiner 
Code:
#include "stdafx.h"
#include "iostream"
#include "math.h"
#include "time.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int eing, c, prim, intzahl, frag, t, t2, wurzel, *arr=0, arrgr;
double time1=0, tstart, zahl, eingdo;
bool isPrim;
cout<<"Wenn sie die Anzahl der Primzahlen von 0 bis x haben wollen geben sie 1 ein.\nWenn sie wissen wollen ob x eine Primzahl ist geben sie 2 ein. ";
do
{
cin>>frag;
cout<<"\n";
if(frag<1 || frag>2)
{
cout<<"Falsche Zahl eingegeben nur 1 und 2 sind erlaubt. Bitte Eingabe wiederholen: ";
}
}while(frag<1 || frag>2);
if(frag==1)
{
cout<<"Bitte eine Zahl eingeben: ";
do
{
cin>>eing;
eingdo=eing;
arrgr=sqrt(eingdo);
arr=new int [arrgr];
cout<<"\n";
if(eing<0)
{
cout<<"Negative Zahlen sind nicht möglich. Bitte Eingabe wiederholen: ";
}
}while(eing<0);
if(eing<2)
{
prim=0;
cout<<"\nEs befinden sich insgesamt "<<prim<<" Primzahlen zwischen 0 und "<<eing<<"\n\n";
return 0;
}
else
{
prim=1;
}
t=0;
arr[0]=3;
tstart = clock();
for(zahl=3;zahl<=eing;zahl+=2)
{
isPrim=true;
for(wurzel=sqrt(zahl), intzahl=zahl, t2=0; arr[t2]<=wurzel; t2++)
{
if(intzahl%arr[t2]==0)
{
isPrim=false; //Es wurde ein Teiler gefunden
break;
}
}
if (isPrim)//Äquivalent zu if (isPrim==true): Wenn also kein Teiler gefunden wurde
{
if(t<arrgr)
{
arr[t++]=intzahl;
}
prim++;
}
}
time1 += clock() - tstart;
time1 = time1/CLOCKS_PER_SEC;
cout<<"Zeit = "<<time1<<" Sekunden";
cout<<"\nEs befinden sich insgesamt "<<prim<<" Primzahlen zwischen 0 und "<<eing<<"\n\n";
}
else if(frag==2)
{
cout<<"Bitte eine Zahl eingeben: ";
do
{
cin>>zahl;
if(zahl<0)
{
cout<<"Negative Zahlen sind nicht möglich. Bitte Eingabe wiederholen: ";
}
}while(zahl<0);
cout<<"\n";
for(wurzel=sqrt(zahl), c=3, intzahl=zahl; c<=wurzel+2; c+=2)
{
cout<<fixed;
if(intzahl%c==0 && c<=wurzel || intzahl==1)
{
cout<<intzahl<<" ist keine Primzahl!\n\n";
break;
}
else if(c>wurzel)
{
cout<<intzahl<<" ist eine Primzahl!\n\n";
}
}
}
return 0;
}
Was könnte ich jetzt noch damit machen.