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;
- namespace _2_6
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a,b;
- int n;
- int max=0;
- int maxzn=0;
- a = int.Parse(Console.ReadLine());
- b = int.Parse(Console.ReadLine());
- for(int i=a;i<=b;i++)
- {
- Console.Write("{0}, c.d=",i);
- n=0;
- for(int j=2;j<=i/2;j++)
- {
- if(i%j==0)
- {
- n++;
- }
- if(n>max)
- {
- max=n;
- maxzn=i;
- }
- }
- Console.WriteLine(n+2);
- }
- Console.WriteLine("{0}, c.d max={1}",maxzn,max+2);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement