0
what is wrong with my code
public class blah2 { public static void main (String args[]) { double num[] = {43.4, 435.55, 65.54}; double res = 0; for (int i = 0; i<4; i++) { num[i]+=res ; } double fina = res/4; System.out.println(fina); } }
2 Answers
+ 2
Hint: In your code, you aren't changing the value of res at all.
0
yeah got it. i wrote the shorthand statement wrong.