Print Numbers Between 1 and 100 which divisible by 3 or 5 in C# – C# Programming Example
Basic C# Console For Loop If Else Statement

Print Numbers Between 1 and 100 which divisible by 3 or 5 in C#

 Write a C# program to print numbers between 1 to 100 which are divisible by 3, 5 .

The for loop counts from 1 to 100 step by step and “if statement”compares next number by 3 or 5 in the loop statement. If the condition is equal to “true”, the number will print on the screen

C# Code:

Output:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: