I have to write a code that will print out the sum of all numbers between 1 and 100 that 7 and 5 go into evenly. I can't really think of how to write it. This is what I have but it doesn't work.
import java.io.*;
public class work
{public static input in = new input();
public static void main(String[] args) throws IOException
{
int sum;
sum = 0;
for (int x=1;x<=1000;x=+1)
if (x%5==//x%7==0){
sum=sum+1};
System.out.println(sum);
}
}