Created
November 5, 2013 20:46
-
-
Save Codeplaza/7325903 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<iostream.h> | |
| #include<conio.h> | |
| #include<stdlib.h> | |
| #include<time.h> | |
| void loop() | |
| { | |
| int i,temp,limit,a[1000]; | |
| cout<<"Enter the limit of the unordered list:"; | |
| cin>>limit; | |
| for(i=1;i<=limit;i++) | |
| { | |
| a[i]=rand()%100; | |
| cout<<"nElement "<<i<<":"<<a[i]; | |
| }} | |
| void main() | |
| { | |
| time_t first,second; | |
| first=time(NULL); | |
| loop(); | |
| second=time(NULL); | |
| cout<<"nnExecution time for the loop is:"<<difftime(second,first)<<"ms"; | |
| getch(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment