Finding Numbers 1 to N not divisible by 3 and 7 in C# – C# Programming Example
Basic C# Console For Loop If Else Statement

Finding Numbers 1 to N not divisible by 3 and 7 in C#

Write a program in C# that enters from the console a positive integer n and prints all the numbers from 1 to n not divisible by 3 and 7

The following program answers the following question : How many integers from 1 to Entered value are not divisible by 3, 7

Ex: (Entered value may be 10, 50, 100, 1000 or any number to 2,147,483,647)

Code:

Output:

You can find more similar examples of programming for this programming language in the site.

 

Write a program in C# print all the numbers from 1 to 100 not divisible by 3 and 7

Leave a Comment

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

%d bloggers like this: