Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include
#include
using namespace std; int main() { clock_t before = clock(); int k = 0; for (int i = 0; i < 100000; i++) { k += i; } clock_t duration = clock() - before; cout << "Duration: " << (float)duration / CLOCKS_PER_SEC << " seconds"; return 0; }
Duration: 0.000172 seconds