-
-
Save GeriG34/51636eb61b0a5dadf68e9433fe6becdf 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.Diagnostics.Metrics; | |
namespace ConsoleApp8 | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Random rnd = new Random(); | |
int value = rnd.Next(); | |
int two = 2; | |
int degree = two; | |
int counter = 1; | |
while (degree <= value) | |
{ | |
degree = degree * two; | |
counter++; | |
} | |
if (degree > value) | |
{ | |
Console.WriteLine(value); | |
Console.WriteLine(counter); | |
Console.WriteLine(degree); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment