1)Your program will get numbers (int) from the user. Do this in a while loop so that you keep getting more numbers.

If the number is a multiple of 3 or 5, do nothing (use the "continue" command for this)
If the number is -99 then exit the loop
All other numbers should be added to the total (yes, you're making a total of all of the numbers)
After you exit the while loop print out the total

my code

package postMarchBreak;
import java.util.Scanner;

public class While99 {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

System.out.println("pick a few numbers and type -99 to stop");

while (true){
int num = sc.nextInt();
int sum = 0;

if (num==-99)
break;

if(num%3 == 0 || num%5 == 0){
continue;






}
sc.close();
}
}

}

how can I add up all the numbers that aren't multiples of 3 or 5

if(num%3 == 0 || num%5 == 0){

continue;
} else {
sum += num
}

i need to add the sum of all the numbers but what you suggested is just printing what I typed

clearly you do not know what the += operator does. It means sum = sum + num. That is, it adds up all the numbers that failed the divisibility test.

At the end of the loop, just print the value of sum.

To add up all the numbers that are not multiples of 3 or 5, you need to declare the variable `sum` outside the while loop and add each number to `sum` inside the loop. Here's the modified code:

```java
package postMarchBreak;
import java.util.Scanner;

public class While99 {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);
System.out.println("pick a few numbers and type -99 to stop");

int sum = 0;

while (true){
int num = sc.nextInt();

if (num == -99)
break;

if (num % 3 == 0 || num % 5 == 0){
continue;
}

sum += num;
}

System.out.println("The total sum of numbers not divisible by 3 or 5 is: " + sum);

sc.close();
}

}
```

In this modified code, `sum` is declared outside the while loop and initialized to 0. Inside the loop, if the number is not a multiple of 3 or 5, it is added to the `sum` using the `+=` operator. After the loop, the total sum is printed using `System.out.println()`.