Advertisement
Guest User

Untitled

a guest
Jan 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 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 _6
  8. {
  9. class Program
  10. {
  11. static string ZwrocNiepodzielne(uint n)
  12. {
  13.  
  14. if(n==0)
  15. { return""; }
  16. if (n % 3 == 0 || n % 5 == 0)
  17. {
  18. ZwrocNiepodzielne(n - 1);
  19. }
  20.  
  21. return ZwrocNiepodzielne(n - 1)+" "+n;
  22.  
  23.  
  24. }
  25. static void Main(string[] args)
  26. {
  27. Console.Write(ZwrocNiepodzielne(7));
  28. Console.ReadKey();
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement