mirror of
https://github.com/nqrduck/ATM.git
synced 2024-12-02 06:43:15 +00:00
25 lines
402 B
Text
25 lines
402 B
Text
|
// BigNumber test: factorials
|
||
|
#include "BigNumber.h"
|
||
|
|
||
|
void setup ()
|
||
|
{
|
||
|
Serial.begin (115200);
|
||
|
while (!Serial) ;
|
||
|
delay(500);
|
||
|
Serial.println ();
|
||
|
BigNumber::begin (); // initialize library
|
||
|
|
||
|
//factorials
|
||
|
BigNumber fact = 1;
|
||
|
|
||
|
for (int i = 2; i <= 200; i++)
|
||
|
{
|
||
|
Serial.print(i);
|
||
|
Serial.print("! = ");
|
||
|
fact *= i;
|
||
|
Serial.println(fact);
|
||
|
}
|
||
|
|
||
|
} // end of setup
|
||
|
|
||
|
void loop () { }
|