Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static double Pomnoz2(double[] tab, int i = 0)
- {
- if (tab.Length == 0) return 0;
- if ((tab[i] % 3 == 0) || (tab[i] % 7 == 0))
- {
- if (i == tab.Length - 1) return tab[i];
- else return Pomnoz2(tab, i + 1) * tab[i];
- }
- if (i == tab.Length - 1) return 1;
- else return Pomnoz2(tab, i + 1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement