title: why is this n(square) complexity?
body: <p>why is this code n^2 complexity when there are three for loops? and how do u tell the different complexity of the code? here is the code: </p>
  
  <pre><code>    int size1= sc.nextInt();
      int size2 = sc.nextInt();
  
      int value=0;
      for(int k=0;k&lt;size1;k++)
      {
          value++;
          //5 times
          for(int x=0;x&lt;size2;x++)
          {
              value++;
              //15 times
              for(int i=0;i&lt;x;i++)
              {
                  value++;
                  //15 times
              }
          }
      }
  
  
      System.out.println(value);
  
  }
  </code></pre>