C++ program!! #include <iostream> #include <time.h> using namespace std; int main(void) { clock_t tc; tc = clock(); cout << "L1:Hello World My Old Friend\n"; cout << "L2:Hello World My Old Friend\n"; cout << "L3:Hello World My Old Friend\n"; cout << "L4:Hello World My Old Friend\n"; cout << "L5:Hello World My Old Friend\n"; // try some c++ heavy function ops here!! // foo(); tc = clock() - tc; double tx = ((double)tc) / CLOCKS_PER_SEC; printf("TimeTaken: %f sec\n", tx); return (0); } Can also be tested without time functions!!; #time ./a.out
Обсуждают сегодня