0
1. How to create an array of 5 or more numbers, find they average and standard dev? However, the user is to supply the numbers. 2. Is it possible to print items in an array in a single line?
I'm not lazy, lol, so I've tried, maybe I'm missing something cause wouldn't stop at the 5th no but its throwing an expectation: import java.util.Scanner; public class ScannerExample { public static void main(String[] args) { int num = 5; String[] Arr = new Di[num]; Scanner taker = new Scanner(System.in); for(int i=0; i<num; i++){ Arr[i] = taker.nextInt(); } System.out.println(names[i]); }} I was hoping this would print all the entered numbers for a start
2 Respuestas
+ 1
Maybe this will help.
There were a few errors in variable names and types. Example: You cannot read an Integer into a string variable without converting it.
I added a function that will put all the Array values into a String variable
I hope this helps.
https://code.sololearn.com/cNHN4yCj6PFM/?ref=app
+ 1
I run the code with Int as array type, I however wrote it wrongly ere, thanks tho, I'll check yours out