# Write a program in Java programming language to determine if a number is modulo 7 i.e divisible by 7 with no remainder.

**Updated:**Nov. 27, 2020 —

**Training Time:**1 Minute

Overseen by: Archangel Macsika

All Training Resources

Scroll for more menu list

**Topic:**Generic - Java Programming

**Difficulty:** Easy.

**Companies who previously asked this:** -.

**Objective:** Write a program in Java programming language to determine if a number is modulo 7 i.e divisible by 7 with no remainder.

**Input:** Numbers from 100 to 200.

**Expected Output:** All numbers between 100 to 200 divisible by 7 with no remainder.

### Sikademy Solution

```
package sikademy;
/**
*
* @author Archangel Macsika
*/
public class Modulo {
public static void main(String[] args) {
int count = 0;
int sum = 0;
for (int i = 100; i < 200; i++) {
if (i % 7 == 0) {
count += 1;
sum += i;
System.out.println(i + "\t is divisible by 7");
}
}
System.out.println("The total numbers divisible by 7 is : " + count + "\t The sum is : " + sum);
}
}
```