# LDPL Code Examples ![Tutorial Logo](https://raw.githubusercontent.com/Lartu/ldpl/master/images/reference-logo.png) ## 😀 Beginner * **helloworld.ldpl**: displays *Hello World!*. * **loop_counter.ldpl**: counts from 1 to 1.000.000. * **oddornot.ldpl**: asks the user for a number and displays if its odd or even. * **absolutevalue.ldpl**: asks the user for a number and then prints out its absolute value. * **leapyear.ldpl**: asks the user for a year and displays if its a leap year or not. * **disancount.ldpl**: asks the user for a number and then executes a [Disan Count](https://esolangs.org/wiki/Disan_Count). * **strcmp-demo.ldpl**: compares strings. * **arguments.ldpl**: prints all command line arguments to the screen. * **99bottles.ldpl**: prints out the song 99 Bottles of Beer. ## 🤔 Intermediate * **fibonacci.ldpl**: prints the first 30 [fibonacci numbers](https://en.wikipedia.org/wiki/Fibonacci_number). * **euler.ldpl**: prints the sum of all the multiples of 3 or 5 below 1000. * **sqrt.ldpl**: calculates the square root of a number using the [Babylonian Method](https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method). * **explode.ldpl**: asks the user to enter some text and then splits it into a list of words without using the built in `split` statement. ## 😤 Advanced * **quine.ldpl**: a [quine](https://esolangs.org/wiki/Quine) that prints its own source code. * **floyd-warshall.ldpl**: an implementation of the [Floyd-Warshall](https://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm) shortest path algorithm. * **brainfuck.ldpl**: a [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck) interpreter. * **bellman-ford.ldpl** an implementation of the [Bellman-Ford](https://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm) shortest path algorithm.