---
title: "C# Program to find all the divisible numbers by 7 which are Less than 100"  
description: "C# Program to find all the divisible numbers by 7 which are Less than 100"  
author: "Steilla Mitchel"  
published: 2023-02-14  
updated: 2023-06-15  
canonical: https://www.mindstick.com/forum/157401/c-sharp-program-to-find-all-the-divisible-numbers-by-7-which-are-less-than-100  
category: "c#"  
tags: ["c#", "java", "programs"]  
reading_time: 3 minutes  

---

# C# Program to find all the divisible numbers by 7 which are Less than 100

how to find all the numbers below 100 which ara divided by 7.

## Replies

### Reply by Aryan Kumar

Sure, here is a C# program to find all the divisible numbers by 7 which are less than 100:

C#

```plaintext
using System;

public class DivisibleBy7 {

    public static void Main(string[] args) {
        Console.WriteLine("Divisible numbers by 7 which are less than 100:");
        for (int i = 1; i < 100; i++) {
            if (i % 7 == 0) {
                Console.WriteLine(i);
            }
        }
    }
}
```

This program uses a for loop to iterate through the numbers 1 to 99. It then uses the modulus operator (%) to check if each number is divisible by 7. If the number is divisible by 7, it is printed to the console. When you run this program, it will output all the divisible numbers by 7 which are less than 100.

Here is an example of how the program would work:

Code snippet

```plaintext
Divisible numbers by 7 which are less than 100:
7
14
21
28
35
42
49
56
63
70
77
84
91
```

### Reply by Sanjay Goenka

Sure, here is an example C# program that finds all the divisible numbers by 7 which are less than 100:

arduinoCopy code

```c
using System;
class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("Divisible numbers by 7 which are less than 100:");
        for (int i = 1; i < 100; i++)
        {
            if (i % 7 == 0)
            {
                Console.WriteLine(i);
            }
        }
        Console.ReadLine();
    }
}
```

This program uses a for loop to iterate through the numbers 1 to 99 and checks if each number is divisible by 7 using the modulus operator (%). If the number is divisible by 7, it is printed to the console.

When you run this program, it will output all the divisible numbers by 7 which are less than 100.

### Reply by Gaurika C

The following code can be employed to get multiples of 7 lesser than 100. The % operator gives the remainder for 2 values. The logic depicts that if the remainder is 0, that means the number is completely divisible by 7. The for loop continues to be executed till the number is greater than 1 and lesser than 100. Note that the sign is not <= which depicts that 100 is not included in the range of numbers to be verified for divisibility. i++ refers to an increment in the value of the number to be checked for division with 7.

Using System;

class Program

{

static void Main(string[ ] args)

{

for (int i = 1; i < 100; i++)

{

if (i % 7 == 0)

{

Console.WriteLine(i);

}

}

}

}

The **output** of the code would be 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98

### Reply by Ashutosh Patel

This is the C# program to find divisible numbers of any specific number below 100,

```cs
using System;

namespace HelloWorld
{
  class Program
  {
    static void Main(string[] args)
    {
      int num;
      Console.WriteLine("Divided numbers by 7 are : ");
      for(int i =1; i<=100; i++)
      {
             num = i%7;

         if(num==0)
         {
              Console.WriteLine(i);
         }
      }
      Console.ReadLine();
    }
  }
}

Outpt: Divided numbers by 7 are:
7
14
21
28
35
42
49
56
63
70
77
84
91
98
```


---

Original Source: https://www.mindstick.com/forum/157401/c-sharp-program-to-find-all-the-divisible-numbers-by-7-which-are-less-than-100

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
