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 ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int s;
- int eredm = 0;
- Console.Write("Szám input: ");
- s = int.Parse(Console.ReadLine());
- Console.WriteLine("A szám természetes osztói: ");
- for(int i = 2; i <= s/2; i++)
- {
- if (s % i == 0)
- {
- Console.WriteLine(s/i);
- }
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement