Write programs to find the sum of the following series:
(a) \(x-\frac { { x }^{ 2 } }{ 2! } +\frac { { x }^{ 3 } }{ 3! } -\frac { { x }^{ 4 } }{ 4! } +\frac { { x }^{ 5 } }{ 5! } -\frac { { x }^{ 6 } }{ 6! } \)
(b) \(x+\frac { { x }^{ 2 } }{ 2 } +\frac { { x }^{ 3 } }{ 3 } +...+\frac { { x }^{ n } }{ n } \)