>Considering the given code as an algorithm calculate the time complexity of 
>this code.
why?


Thanks,
Tyler Littlefield
email: [EMAIL PROTECTED]
web: tysdomain-com
Visit for quality software and web design.
skype: st8amnd2005

  ----- Original Message ----- 
  From: Faisal Saleem 
  To: [email protected] 
  Sent: Monday, November 10, 2008 12:41 AM
  Subject: [c-prog] Algorithm concept in C++


  Dear All,
   
  Considering the given code as an algorithm calculate the time complexity of 
this code.
   
  #include<iostream>
  #include<stdlib.h>
  using namespace std;
   
  int main(){
      int i, j, n;
  for(i=0;i<n; i++){
   
          for(j=0; j<n; j++){
                  cout<<"my time complexity is = "<<i*j<<endl;
                  }
          cout<<"complexity is increasing"<<j<<endl;
          }
  system("pause");
  return 0;
  }
   
   
   

  [Non-text portions of this message have been removed]



   

[Non-text portions of this message have been removed]

Reply via email to