Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
#include
#include
int main() { clock_t start = clock(); long long sum = 0; for (int i = 0; i < 10000000; i++) { sum += i; } clock_t end = clock(); double seconds = (double)(end - start) / CLOCKS_PER_SEC; printf("Sum: %lld\n", sum); printf("Time: %f seconds\n", seconds); return 0; }
Sum: 49999995000000
Time: 0.021372 seconds