+ 1
Why is my code wrong according to sololearn
Task: The given code declares an array that holds the monthly revenues for a company for a year. You need to calculate the average monthly revenue for the year For that, calculate the sum of the revenue for all the months and divide it by the number of items in the array. https://code.sololearn.com/cmWooDC9s30e/?ref=app
5 odpowiedzi
+ 3
I got no issues when I run the code
+ 2
Can you task number Or link..?
+ 1
Jayakrishna🇮🇳 YIPMONG Jr
The given code declares an array that holds the monthly revenues for a company for a year.
You need to calculate the average monthly revenue for the year
For that, calculate the sum of the revenue for all the months and divide it by the number of items in the
array.
This is the task, when I run the code, I get a "false test case hidden" . The task can be found in the java for beginners "looping over arrays " "anual revenue "exercise ". (I don't know how to link the exercise, maybe because I am using a tablet?)
+ 1
Ahhh,I used int instead of double, that was the problem, it works now. Thank you
0
Oh great
Karim