Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. static double Pomnoz2(double[] tab, int i = 0)
  2. {
  3. if (tab.Length == 0) return 0;
  4.  
  5. if ((tab[i] % 3 == 0) || (tab[i] % 7 == 0))
  6. {
  7. if (i == tab.Length - 1) return tab[i];
  8. else return Pomnoz2(tab, i + 1) * tab[i];
  9. }
  10. if (i == tab.Length - 1) return 1;
  11. else return Pomnoz2(tab, i + 1);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement