/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package BASICJAVA;
import java.util.Scanner;
/**
*
* @author ABIR
*/
public class Adds_All_Numbers_That_Are_Multiples_Of_Either_7_And_9_Up_To_600_ {
public static void main(String[]args){
Scanner abir =new Scanner(System.in);
int temp=1;
for (int i = 0; i < 600; i++) {
if(i%7==0||i%9==0){
if(i%7==0&&i%9==0){
temp=temp-i;
}
temp=temp+i;
}
}
System.out.println("Result is = "+temp);
}
}