r/javahelp • u/[deleted] • Apr 16 '16
why wont this average program work?
why wont it show the average what do i need to change in my for loop? if i use for each loop it works but i dont wanna use a for each loop.
0
Upvotes
r/javahelp • u/[deleted] • Apr 16 '16
why wont it show the average what do i need to change in my for loop? if i use for each loop it works but i dont wanna use a for each loop.
2
u/[deleted] Apr 16 '16
You know integers are whole numbers? You'll want to use a
floatordouble.You also need to cast it to a floating point e.g.
also you need to use numbers[i], not i