Wykonując program podaje liczbę 1 z 9 zerami to wyskakuje mi błąd o treści: "this application has requested the Runtime to terminate it in an usualy way." Natomiast kiedy podaje liczbe 1 z 10 zerami lub większą to program się wykonuje ale zwraca mi wartość czasu zapisu równą zero. Co to może być? Na wszelki wypadek podaję kod chociaż jest taki jak w odcinku 10.:
#include <iostream>
#include "time.h"
#include "cstdlib"
using namespace std;
int ile;
clock_t start, stop;
double czas;
int main()
{
cout<<"Ile liczb w tablicy:"<<endl;
cin>>ile;
int tablica;
tablica = new int[ile];
start=clock();
for(int i=0; i<ile; i++)
{
tablica[i]=i;
tablica[i]+=50;
}
stop=clock();
czas=(double)(stop-start)/CLOCKS_PER_SEC;
cout<<"Czas zapisu: "<<czas<<" sec."<<endl;
delete [] tablica;
return 0;
}