Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- class Program
- {
- static void Main()
- {
- Console.Write("N:= ");
- int n = int.Parse(Console.ReadLine());
- for(int i= Convert.ToInt32(Math.Sqrt(n))+1;i>1;i--)
- if (n % i == 0)
- {
- Console.WriteLine("Наибольший делитель: " + i);
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement