integer total integer n total = 0 n = 1 while n <= 105 Put n to output total = total + n n = n + 1 Put "\n" to output Put total to output