/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
{
int n1 = 3;
int n2 = 5;
int result = 0;
for(int i = 1; i < 1000; i++){
result = (i % n1 == 0 && i % n2 == 0)? result += i : result;
}
System.
out.
println("A soma dos multiplos de 3 e 5 abaixo de 1000, é: " +result
); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkgICAgaW50IG4xID0gMzsKICAgICAgICBpbnQgbjIgPSA1OwogICAgICAgIGludCByZXN1bHQgPSAwOwoKICAgICAgICBmb3IoaW50IGkgPSAxOyBpIDwgMTAwMDsgaSsrKXsKICAgICAgICAJcmVzdWx0ID0gKGkgJSBuMSA9PSAwICYmIGkgJSBuMiA9PSAwKT8gcmVzdWx0ICs9IGkgOiByZXN1bHQ7CiAgICAgICAgfQogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiQSBzb21hIGRvcyBtdWx0aXBsb3MgZGUgMyBlIDUgYWJhaXhvIGRlIDEwMDAsIMOpOiAiICtyZXN1bHQpOwoJfQp9