#include <iostream.h>
#include <typeinfo.h>
#include <time.h>


void main()
{
	clock_t start,finish;

	int *y = new int[10];
	int W;
	int e[10],w,q=0;
	for(w=0;w<1000000000;w++)
		W=0;
	cout<<"HERE WE GO :"<<endl;
	/*
	for(int I=0;I<2;I++)
	{
	cout <<" HERE WE GO ...:"<<endl<<endl;
start = clock();
	for( w=0 ;w <1000000000;w++)
	{
		if(w%10==0)q=0;
		e[q] = 100;
		q++;
	}
	
	finish = clock();
	cout <<"SECOND NORMAL IS :"<<(double)(finish-start)/CLOCKS_PER_SEC<<endl;


	start = clock();
	for(w=0 ;w <1000000000;w++)
	{
		if(w%10==0)q=0;
		*(y+q) = 100;
		q++;
	}
	
	finish = clock();
		cout <<"FIRST POINTER TIME IS : " <<(double)(finish-start)/CLOCKS_PER_SEC<<endl;

		start = clock();
	for(w=0 ;w <1000000000;w++)
	{
		if(w%10==0)q=0;
		y[q] = 100;
		q++;
	}
	
finish = clock();
		cout <<"FIRST POINTER TIME IS : " <<(double)(finish-start)/CLOCKS_PER_SEC<<endl;

	}	

  */
	start = clock();
	for(w=0 ;w <20000000;w++)
	{
		if(w%10==0){q=0;y= new int[10];}
		y[q] = 100;
		q++;
	}
	
	delete []y;
finish = clock();
		cout <<"BAD VERSION TIME IS : " <<(double)(finish-start)/CLOCKS_PER_SEC<<endl;
////////////////////////////////////////////////
		start = clock();

		
	for(w=0 ;w <20000000;w++)
	{
		if(w%10000==0){q=0;y= new int[10000];}
		y[q] = 100;
		q++;
	}
	
	//delete []y;
finish = clock();
		cout <<"MORE BETER TIME IS " <<(double)(finish-start)/CLOCKS_PER_SEC<<endl;
//////////////////////////////////////////////////		
start = clock();

	
	for(w=0 ;w <20000000;w++)
	{
		if(w%10000000==0){q=0;y= new int[10000000];}
		y[q] = 100;
		q++;
	}
	
	delete []y;
finish = clock();
		cout <<"THE WORST TIME IS:" <<(double)(finish-start)/CLOCKS_PER_SEC<<endl;

////////////////////////////////////////////////////



	cin.ignore();

}
