Skip to content

lotharschulz/armstrongNumbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Armstrong Numbers implementations

with different programming languages.

Why?

This repo are coding finger exercises with different languages using narcissistic/armstrong numbers. It is mainly about getting familiar with the different languages. You can also discover language similarities and differences based on the use case.

java

run

mvn exec:java -Dexec.mainClass="info.lotharschulz.App"

test

mvn [clean] test

scala

run

sbt "run-main info.lotharschulz.App"

test

sbt [clean] test
triggered clean tests
~ ;clean ;test # triggered clean tests

python

run

python armstrong/armstrong.py

test

cd test
python test_armstrong.py

clojure

run

lein run

test

lein test
triggered test

prerequsite: lein-midje plugin installed

lein midje :autotest

typescript

run

tsc armstrong.ts && node armstrong.js

test

yarn test

lint

yarn lint
yarn lint:ci

kotlin

run

./gradlew run

test

./gradlew test

lint

./gradlew ktlintCheck

static code analysis

detekt
./gradlew detekt
mobsfscan
# installation - pip3 install mobsfscan
mobsfscan src/

go (golang)

run

go run armstrong.go

test

go test
go test -v --bench . --benchmem

format

gofmt -w armstrong.go
gofmt -w armstrong_test.go

rust

run

cargo run

test

cargo test