Skip to content

Instantly share code, notes, and snippets.

View kaworun's full-sized avatar

Kenta Oki kaworun

View GitHub Profile
@kaworun
kaworun / consumer.txt
Created February 2, 2013 11:36
Twitterのコンシューマーキーらしきもの
Twitter for Android
Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
Twitter for iPhone
Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU
a, b = 10, 25
function sum(a, b)
return a + b
end
print(sum(a, b))
print "あなたの身長は?"
cm = io.read("*n")
function convert(cm)
t = {
"inch\t" .. cm / 2.54,
"feet\t" .. cm / 30.48,
"yard\t" .. cm / 91.44,
"digit\t" .. cm / 1.905,
"mile\t" .. cm / 160934.4,
function swap(x, y) do
return y, x
end
print(swap(1, 2))
for i = 1, 9 do
for j = 1, 9 do
print(i .. " * " .. j .. " = " .. i * j)
end
print("\n")
end
print(string.format("あなたの月勤務数は %d 日間ですね。", calc1) )
calc2 = (x * y) * z * 4
print(string.format("あなたの1ヶ月間の給料は %d 円です。", calc2))
-- アルバイト時給換算
a={nil,nil,nil,nil,nil,nil}
print("貴方の時給") -- X
a[1]=io.read("*n")
print("貴方が一日働く時間は?") -- Y
a[2]=io.read("*n")
print("貴方の週勤務数は?") -- Z
a[3]=io.read("*n")
a[4]=a[3]*4
-- アルバイトの給料計算。
print("あなたの時給は?")
x = io.read()
print(x)
print("あなたは何時間勤務?")
y = io.read()
print(y)
x = io.read()
print(x)
for i = 1, 100 do
if i % 3 == 0 and i % 5 == 0 then
print("FizzBuzz")
elseif i % 3 == 0 then
print("Fizz")
elseif i % 5 == 0 then
print("Buzz")
else print(i)
end
end