- 1
Can someone help me with this JAVA question:
Write a method that computes the sum of 1 through n then returns the average (This is a question from one of my classes that i need help with)
2 Answers
+ 2
Try yourself first and post your attempt. Before trying complete the lessons first. Atleast for this task, lessons of variable, loop, arithmetic operations.. Hope it helps..
+ 2
You need to calmly analyze what you need. You need to know how method looks like. How to pass an argument to it. What do you use to cycle through numbers one by one. What arhitmetic operation you need to perform on those numbers.
These things are explained sufficiently in the java course on sololearn. Donāt rush it, donāt skip fudamentals.
It will work only if you let yourself figure it out on your own.
Yes, you will make mistakes, but donāt be afraid of them.
Post your attempt if ots not working and youāre seriously stuck.
Good luck my friend.