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
#include <iostream> | |
#include <cstdio> | |
#include <ctime> | |
#include <cstring> | |
#include <cstdlib> | |
#include <cmath> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netdb.h> |
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
#include <stdio.h> | |
int fibo(int x) | |
{ | |
if(x < 2) | |
return 1; | |
else | |
return fibo(x - 2) + fibo(x - 1); | |
} | |
int main() |
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
gcc hello.c -o hello (または clang hello.c -o hello) | |
./hello |
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
# 数字の表示 | |
# Hello world したいところですが、文字列が使えない... | |
print 43 | |
print 123456789 # 32bit 符号付き整数のみ対応 | |
# 変数と計算 | |
# 英文字で始まれば変数です。宣言は必要ありません。 | |
var = 12 | |
i = 43 | |
var = i + var * (12 / 5) # 小数が使えないので、12/5=2 |
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
# What's the Lit? | |
Lit is programming language. | |
Lit uses JIT(Just-in-Time) Compile, so very faster. | |
Also, remember is easy because Lit syntax is like Ruby' syntax. | |
**Copyright (C) 2015 maekawatoshiki All Rights Reserved.** | |
# How to use |
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 fibo x | |
if x < 2 | |
1 | |
else | |
fibo(x - 1) + fibo(x - 2) | |
end | |
end | |
puts fibo 40 |
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
str = gets | |
for i in 0..len(str)-1 | |
puts "str[", i, "] = " + str[i] | |
end |
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
require "std" | |
module Calc | |
def prim(input:string):string | |
str = "" | |
if input[$pos].alpha? # function (sqrt..) | |
fname = "" | |
while input[$pos].alpha? | |
fname += input[$pos] | |
$pos += 1 |
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
#include <stdio.h> | |
#include <time.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netdb.h> | |
#include <netinet/in.h> |
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
### Keybase proof | |
I hereby claim: | |
* I am maekawatoshiki on github. | |
* I am uint256_t (https://keybase.io/uint256_t) on keybase. | |
* I have a public key ASCpxh_KSIPDBk5IDLTmAckR6-yDwJILn1-C-CBuDgcDkwo | |
To claim this, I am signing this object: |