Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Velsimir/95f9069ff314527b21f7c603aeec1777 to your computer and use it in GitHub Desktop.
Save Velsimir/95f9069ff314527b21f7c603aeec1777 to your computer and use it in GitHub Desktop.
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