#include <stdio.h>
int gx = 5;

int main(void)
{
  int ly = 6;
  int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0;
  int i,j,k;

/* global: parametric */
  for (i = 0; i < gx; i++)
    a+=i;

/* local: parametric */
  for (i = 0; i < ly; i++)
    b+=i;

/* nested and fixed iterations */
  for (i = 0; i < 10; i++)
    for (j = 1; j < 11; j++)
      for (k = 2; k < 12; k++)
        c+=i+j+k;

/* triangular and fixed iterations 1 */
  for (i = 0; i < 15; i++)
    for (j = 0; j < i; j++)
        d+=i+j+5;

/* triangular and fixed iterations 2 */
  for (i = 0; i < 170; i++)
    for (j = i; j < 180; j++)
        e+=i+j+20;

/* triangular and parametric 1 */
  for (i = 0; i < gx; i++)
    for (j = 0; j < i; j++)
       f+=i+j+1;

/* triangular and parametric 2 */
  for (i = ly; i < 200; i++)
    for (j = i; j < 1000; j++)
        g+=i+j+4;

  return (a+b+c+d+e+f+g);
  
}
