Java program to find sum of all integers between 100 & 200 that are divisible by 7

Friday, February 4th, 2011
1
2
3
4
5
6
7
8
9
10
11
12
/* Write a program to find sum of all integers greater than 100 and
   less than 200 that are divisible by 7 */
class SumOfDigit{
	public static void main(String args[]){
		int result=0;
		for(int i=100;i<=200;i++){
			if(i%7==0)
				result+=i;
		}
		System.out.println("Output of Program is : "+result);
	}
}
Avatar of surajk

Author Name :
surajk

Total : 1 Comment


One Response to “Java program to find sum of all integers between 100 & 200 that are divisible by 7”

  1. test says:

    Hello There. I discovered your blog the use of msn. That is an extremely smartly written article. I will be sure to bookmark it and come back to read extra of your useful information. Thank you for the post. I’ll definitely return. test http://testdomain.com

Leave a Reply

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup

Email: