// Demonstration of time and big-Os #include #include #include using namespace std; double f(int t, int n) { if(t==1) return n; else if(t==2) return n*n/5.0; else return exp(n)/25.0; } int main() { int N; cout << "N=?"; cin >> N; for(int i=1; i<=3; i++) { sleep(f(i,N)); cout << i << "\t" << f(i,N) << endl; } cout << '\007' << endl; return 0; }