Last active
October 18, 2022 12:35
-
-
Save Velsimir/95f9069ff314527b21f7c603aeec1777 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Security.Policy; | |
using System.Threading; | |
namespace iJunior | |
{ | |
class MainClass | |
{ | |
public static void Main(string[] args) | |
{ | |
Random random = new Random(); | |
int smallestNumber = 1; | |
int highestNumber = 27; | |
int devider = random.Next(smallestNumber, highestNumber); | |
int quantityOfDivisibleNumbers = 0; | |
int maxValue = 999; | |
int minValue = 100; | |
for (int i = 1; i <= maxValue; i += devider) | |
quantityOfDivisibleNumbers += i >= minValue ? 1 : 0; | |
Console.WriteLine($"{devider}, {quantityOfDivisibleNumbers}"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment