{
int start = 1, end = 100, step = 1;
int element;
long sum = 0;
int count = 0, min = Integer.MAX_VALUE, max = Integer.MIN_VALUE;
for (int i = start; i <= end; i+=step)
{
element = i;
sum += element;
count++;
min = Math.min(min, element);
max = Math.max(max, element);
System.out.printf("(%d/%d) ", i, element);
}
if (count == 0)
{
System.out.printf("Count:%,d, Sum:%,d, Min, Max not available", count, sum);
}
else
{
System.out.println();
System.out.printf("Sum: %,d, Count: %,d, Min: %,d, Max: %,d ", sum, count, min, max);
}
}
}