I am doing arrays and I need to print the total numbers of arrays are less than the average of all the arrays. It should be simple, but I have no idea how to do it.
Any help?
Type: Posts; User: maximus20895
I am doing arrays and I need to print the total numbers of arrays are less than the average of all the arrays. It should be simple, but I have no idea how to do it.
Any help?
I am trying to make it say feet meters meters feet, but instead it just says feet meters then enters the data and then starts the meter to feet. There are only two columns and I am trying to...
Ah, that makes sense.
Thanks, I appreciate it!
I want the while at the end to say while JOption says yes. Meaning when asked if they want to play again it will re loop and play it again if they click yes. I have looked and I can't find how to do...
Haha, sorry.
It does the same thing as the first which is when it calculates the average it adds the zero with it. So the average goes way down. I just want it to calculate any - or + numbers and...
Here is the code:
import java.util.Scanner;
public class Problem2 {
public static void main (String []args){
// Scanner
Scanner scan = new Scanner(System.in);
Still doesn't work :(
I switch the do{ with while (number != 0){ and deleted the while in the do :(
Stupid zero.
I have to compute the average in this program, but the average cannot consists of zero which ends the program. For example if I enter 1, 2, 3, -1, then 0 to exit, the average will be the sum (5) over...
Yes, it all makes sense. I appreciate it :)
Okay, so I just played around with it and this is what I got and it seemed to work.
package practice;
//imports
import java.util.Scanner;
public class DoWhile {
Ah, that makes sense. So would I have to change the do or what?
How would I declare the variable before the do-while loop?
I just copied what my teacher did haha.
I have tried over and over again, but I can't seem to get this; especially with the while at the end. I think the problem is the "guess" right after the while, but I don't know. Any help would be...