This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (def myList '(251 45)) | |
| (first myList) | |
| (println myList) | |
| (def myList2 '("yes" "no" "maybe")) | |
| (third myList2) | |
| (println myList2) | |
| (println myList myList2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Console.WriteLine("Please input the number of the base of the triangle. "); | |
| int triangleBase = Convert.toInt32(Console.ReadLine()); | |
| Console.WriteLine("Please input the number of the height of the triangle. "); | |
| int triangleHeight = Convert.toInt32(Console.ReadLine()); | |
| Console.WriteLine("Joining..."); | |
| int result = triangleBase * triangleHeight / 2; | |
| Console.WriteLine($"Done! Your result: {result}"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn messagesys [message] | |
| (println "Your message: ") | |
| (str message)) | |
| (messagesys "I love Clojure <3") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:io'; | |
| void main() { | |
| for (int i = 1; i < 1000000000; i++) { | |
| print(i); | |
| } | |
| // Good luck with this one. | |
| print("Enter your password (any): "); | |
| String? password = stdin.readLineSync(); | |
| if (password != null) { | |
| print("Thanks for $password, now have access to your account (I do not)"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn HelloName [name] | |
| (str "Hello " name (+ 126.5 126.5))) | |
| (HelloName "Paul") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (def myNum 251) | |
| (println myNum) | |
| (defn HelloWorld [myNum2] | |
| (str "Hello World! " myNum2)) | |
| (HelloWorld) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const counter = 6; | |
| for (counter in range(25)) { | |
| counter++; | |
| console.log(counter); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Console.WriteLine("Number 1: "); | |
| int number1 = Convert.toInt32(Console.ReadLine()); | |
| Console.WriteLine("Number 2: "); | |
| int number2 = Convert.toInt32(Console.ReadLine()); | |
| int sum = number1 + number2; | |
| Console.WriteLine($"Your sum's result: {sum}"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; A function that will just print 2+2 with a random sentence | |
| (defn sum [message] | |
| (str message (+ 2 2)) | |
| (sum "2 + 2 is: ") | |
| ;; A function that will scare whoever called it. | |
| (defn scare [scary_text] | |
| (str "Hey you, " scary_text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let followers = 5; | |
| console.log("Current followers: " + (followers)); | |
| followers = followers + 1; | |
| console.log("Current followers: " + (followers)); | |