Winter Vacation (b) spark learning

spark installation is very simple ( Tutorial )

1. Calculation Series

Calculate a programming script and outputs the following manner before the series n a sum of Sn, Sn until just greater than or equal to q

So far, where q is an integer greater than 0, the value entered via the keypad.

 

 

Examples such as , if the q value is 50.0, the output should be: Sn = 50.416695. Please save the file as source

exercise2-1.scala, in REPL test mode, the test sample: q = time 1, Sn = 2; q = time 30, Sn = 30.891459;

When q = 50, Sn = 50.416695.

Guess you like

Origin www.cnblogs.com/sonofdemon/p/12215377.html