# Golang Program to Find the Numbers which are Divisible by 7 and Multiple of 5 in a Given Range

## Steps

• Take in the upper and lower range and store them in separate variables.
• Use a for loop which ranges from the lower range to the upper range.
• Find the numbers which are divisible by both 5 and 7.
• Print those numbers.
 Case 1Enter the lower range: 1Enter the upper range: 1003570 Case 2Enter the lower range: 400Enter the upper range: 700420455490525560595630665700

## Explanation

• User must enter the upper range limit and the lower range limit.
• The for loop ranges from the lower limit to the upper limit.
• The value of i ranges from the lower limit to the upper limit.
• Whenever the remainder of i divided by 5 and 7 is equal to 0, print i.

## Example

Live Demo

package main
import "fmt"
func main(){
var upperLimit, lowerLimit int
fmt.Printf("Enter lower limit for the range: ")
fmt.Scanf("%d", &lowerLimit)
fmt.Printf("Enter upper limit for the range: ")
fmt.Scanf("%d", &upperLimit)
for i:=lowerLimit; i<=upperLimit; i++{
if i%7 == 0 && i%5 == 0{
fmt.Println(i)
}
}
}

## Output

Enter lower limit for the range: 1
Enter upper limit for the range: 100
35
70