Advertisement
Guest User

Oszt

a guest
May 26th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication1
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int s;
  14. int eredm = 0;
  15. Console.Write("Szám input: ");
  16. s = int.Parse(Console.ReadLine());
  17. Console.WriteLine("A szám természetes osztói: ");
  18. for(int i = 2; i <= s/2; i++)
  19. {
  20. if (s % i == 0)
  21. {
  22. Console.WriteLine(s/i);
  23. }
  24. }
  25. Console.ReadLine();
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement