My bubble sort code is not showing the processing time

please look into my code

See this code

#include<iostream>
using namespace std;

void bubblesort(int a[], int n){
	for (int itr = 1;itr<=n-1;itr++)
	{
		for (int j = 0;j<=(n-itr-1);j++)
		{
			if (a[j]>a[j+1])
			{
				swap(a[j],a[j+1]);
			}
		}
	}
}
int main(){
int n;
cin>>n;
int a[10000];
for (int i = 0; i <n;i++)
{
	a[i]=i;
}
clock_t t;
t = clock();
bubblesort(a,n);
t = clock() - t;
cout << "Using buuble sort function, it took " << (float)t/CLOCKS_PER_SEC << " seconds" << endl;
for (int i = 0; i<n;i++)
{
	cout<<a[i]<<",";
}

	
	return 0;
}

as your code is taking very less time, it is showing it to zero. Changed the clock function and increased the constraints and now it is working fine.

Thanks.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.