Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Say "I love you" in X programming languages! And X = 24
    /\_/\     /\_/\
  =( owo )= =( owo )=
\\  )   (     )   (  //
 \\(_ _ _)   (_ _ _)//
  1. C
#include <stdio.h>
int main()
{
    printf("I love you\n");
    return 0;
}
  1. C++
#include <iostream>
int main()
{
    std::cout<<"I love you"<<std::endl;
    return 0;
}
  1. Java
public class ILoveU{
public static void main(String[] args) {
        System.out.println("I love you");
        }
}
  1. python
#!usr/bin/python
print "I love you"
  1. perl
#!usr/bin/perl
print "I love you\n";

Or

$ perl -e 'print "I love you!\n"'
  1. scheme
(display "I love you!")
  1. Bash shell
echo "I love you"
  1. Clojure
(def IloveU
        ( fn []
        "I love you!"))

(IloveU)
  1. Ruby
puts "I love you"
  1. JavaScript
document.write("I love you!")
  1. Reactjs
<!DOCTYPE html>
<html>
        <head>
                <script src="build/react.js"></script>
                <script src="build/JSXTransformer.js"></script>
        </head>
        <body>
                <div id="example"></div>
                <script type="text/jsx">
                        React.render(
                                <h1>I love you!</h1>,
                                document.getElementById('example')
                        );
                </script>
        </body>
</html>
  1. erlang
% save this as iloveu.erl
-module(iloveu).
-export([start/0]).
start() ->
        io:fwrite("I love you!\n").

complie using

$ erlc iloveu.erl

excute by

$ erl -noshell -s iloveu start -s init stop

Or

$ erl -noshell -eval 'io:fwrite("I love you!\n"), init:stop().'
  1. Scala
object iloveu {
        def main(args: Array[String]) {
        println("I love you!")
        }
}
  1. Rust
fn main()
{
    println!("I love you!");
}
  1. nim
echo("I love you!")
  1. Smalltalk
Transcript show: 'I love you!'.
  1. Tcl
puts "I love you!"
  1. R
cat('I love you!\n')
  1. Lua
print("I love you!")
  1. Dart
main() {
    print(' I love you!');
}
  1. Eiffel
class
IloveU
create
    make
feature
    make
        do
            print ("I love you!%N")
        end
end
  1. F#
printfn " I love you!"
  1. Haskell
main = putStrLn "I love you!"
  1. Prolog
main :- write('I love you!'), nl.
  1. Go
package main

import "fmt"

func main() {
        fmt.Println("I love you!")
}
  __      __
 /  \    /  \
(    \__/    )
 \          /
  \        /
   \      /
    \    /
     \  /
      \/
@firayhan2

This comment has been minimized.

Copy link

@firayhan2 firayhan2 commented Dec 30, 2020

bah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment