Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clock_t start;
- clock_t end;
- double cpu_time_used;
- float getal = 0;
- start = clock();
- for(int i=0; i<100000000; i++) {
- getal += 1;
- }
- end = clock();
- cpu_time_used = (((double) (end-start)) / CLOCKS_PER_SEC) / 100000000;
- printf("Addition time: %e\n", cpu_time_used);
Add Comment
Please, Sign In to add comment