// Sum of numbers are dividable by 7 & 8 between 100 and 2000
class ssvsumnat2
{
public static void main(String args[])
{
int sum=0,count=0;
System.out.println("\n\n\tSum of numbers are divible by 7 & 8 between 100 and 2000");
System.out.println("\t===========================================");
for(int i=100;i<=2000;i++)
{
if( (i%7==0)&&(i%8==0) )
{
sum = sum + i;count++;
}
}
System.out.println();
System.out.println("\n\n\tCOUNT = " + count);
System.out.println("\n\n\tSUM = " + sum);
}
}Java
Calculate Sum Of Numbers Are Dividable By 7 & 8 Between 100 And 2000 Using Java

Written by
View ProfileSenthilvelan Sambamoorthy
Senthilvelan Sambamoorthy is working as a Professor in Department of Master of Computer Applications, Paavai Engineering College, Namakkal, Tamilnadu, India, He is Masters in Computers Applications. Having 18+ years of experience and his area of interest is Java, JSP, Servlet, J2EE, C#, PHP, Python ASP.NET, SQL Server and etc.
