Untitled
unknown
plain_text
8 months ago
788 B
6
Indexable
1#include <iostream>
2 #include <bits/stdc++.h>
3 using namespace std;
4
5 void function1()
6{
7 for (int i = 0; i < 20000000; i++)
8 cout<<"+";
9}
18 void function2()
11 {
12 for (int i = 0; i < 20000000; 1++)
13 cout<<"-";
14)
15 int main()
16 {
17 time t start, end;
18 time(&start);
19 ios_base::sync_with_stdio(false);
20 function1();
21 function2();
22 time(&end);
23 double time_taken double (end start);
24 cout << "Time taken by program is: " << fixed
25 << time_taken << setprecision(20);
26 cout << sec << endl;
27 return 0;
28}
}
}
}Editor is loading...
Leave a Comment