Thread
:
Quick java program
View Single Post
Dec 6th, 2005, 11:11 PM
#
12
kludge
Newbie
Join Date: Aug 2005
Posts: 2
Rep Power:
0
It looks like the loop in int yeah(int y) is just calculating an arithmetic series from 0 to y. The loop can be removed and replaced with the formula for this sum which is: tv = y*(y+1)/2
kludge
View Public Profile
Find More Posts by kludge