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 _6
- {
- class Program
- {
- static string ZwrocNiepodzielne(uint n)
- {
- if(n==0)
- { return""; }
- if (n % 3 == 0 || n % 5 == 0)
- {
- ZwrocNiepodzielne(n - 1);
- }
- return ZwrocNiepodzielne(n - 1)+" "+n;
- }
- static void Main(string[] args)
- {
- Console.Write(ZwrocNiepodzielne(7));
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement