Please help me to find a error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please help me to find a error

Can you edit it

31st Jan 2023, 6:21 AM
Vinze Raymundo
Vinze Raymundo - avatar
4 Answers
+ 3
You missed closing Curly braces at the end
31st Jan 2023, 6:41 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
import java.util.Scanner; public class ArraysandArrayLists { public static void main (String[] args){ //variable and objects declaration Scanner inp = new Scanner(System.in); int[] numbers = new int[5]; int i = 0; int end; int sum = 0; do{ System.out.print ("What is your number?" ); numbers[i] = inp.nextInt(); i++; System.out.print (" Enter 555 to quit and 9 to continue"); end = inp.nextInt(); } while (end != 555); //display the output for (int j = 0; j < numbers.length ;j++){ System.out.println(numbers[j]); } System.out.println("The average numbers is " + (sum/numbers.length)); }
31st Jan 2023, 6:22 AM
Vinze Raymundo
Vinze Raymundo - avatar
0
Here's may code
31st Jan 2023, 6:22 AM
Vinze Raymundo
Vinze Raymundo - avatar
0
Vinze Raymundo same questions.. https://www.sololearn.com/Discuss/3188087/?ref=app before posting any question follow certain rules and regulations . Welcome to Sololearn forum https://www.sololearn.com/discuss/1316935/?ref=app https://www.sololearn.com/discuss/3021159/?ref=app
31st Jan 2023, 6:46 AM
Darpan kesharwani🇮🇳[Inactive📚]
Darpan kesharwani🇮🇳[Inactive📚] - avatar