Reputation: 91
I need to run a segment of code like shown:
sum = 0;
for(i = 0; i < n; i++)
for(j = 0; j < i; j++)
sum++;
and find the running times of several values of N and the growth rate associated with those values.
Right now I am using Dev C++ (could use any IDE), but I can't figure out a way to actually display the run times.
Upvotes: 0
Views: 66
Reputation: 33197
You can:
time()
API: http://linux.die.net/man/2/timetime
.Upvotes: 1