Guest User

Untitled

a guest
Sep 24th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <time.h>
  3.  
  4. int main() {
  5. char a,b,c,d,e,f,g;
  6. clock_t start, end;
  7. /* Store start time here */
  8. start = clock();
  9.  
  10. for(a='A';a<='Z';++a){
  11. for(b='A';b<='Z';++b){
  12. for(c='A';c<='Z';++c){
  13. for(d='A';d<='Z';++d){
  14. for(e='A';e<='Z';++e){
  15. for(f='A';f<='Z';++f){
  16. for(g='A';g<='Z';++g){
  17. printf("%c%c%c%c%c%c%c\t",a,b,c,d,e,f,g);
  18. /* This will print the current number of the combination
  19. printf("%d",i);
  20. ++i;
  21. */
  22. }
  23. }
  24. }
  25. }
  26. }
  27. }
  28. }
  29.  
  30.  
  31. end = clock();
  32. /* Get the time taken by program to execute in seconds */
  33. double duration = ((double)end - start)/CLOCKS_PER_SEC;
  34.  
  35. printf("Time taken to execute in seconds : %f", duration);
  36. return 0;
  37. }
Add Comment
Please, Sign In to add comment