Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- internal class Program
- {
- static void Main(string[] args)
- {
- int minRandom = 1;
- int maxRandom = 101;
- int numberRaisedDegree = 2;
- int degree = 1;
- int maxNumber = 0;
- int number = new Random().Next(minRandom, maxRandom);
- for (int i = numberRaisedDegree; i<number; i *= numberRaisedDegree)
- {
- degree++;
- maxNumber = i * numberRaisedDegree;
- }
- Console.WriteLine($"{numberRaisedDegree} в степени {degree} превосходит {number} и равняется {maxNumber}");
- Console.ReadKey();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement