Can someone help me with this JAVA question: | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
- 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)

26th Mar 2022, 7:35 PM
Ashley Norman
2 Respostas
+ 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..
26th Mar 2022, 7:39 PM
Jayakrishna šŸ‡®šŸ‡³
+ 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.
26th Mar 2022, 8:21 PM
Nick