This file contains 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
#単純に加算 | |
sum = 0 | |
(1..999).each do |i| | |
if (i % 3) == 0 | |
sum += i | |
elsif (i % 5) == 0 | |
sum += i | |
end | |
end | |
puts sum |
This file contains 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
# coding: Shift_JIS | |
#単純に加算 | |
sum = 0 | |
for i in range(1, 1000): | |
if i % 3 == 0: | |
sum += i | |
elif i % 5 == 0: | |
sum += i | |
print sum |
This file contains 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
<?php | |
#単純に加算 | |
$sum = 0; | |
foreach (range(1, 999) as $i) | |
{ | |
if (($i % 3) == 0) $sum += $i; | |
elseif (($i % 5) == 0) $sum += $i; | |
} | |
echo "$sum", "\n"; | |
This file contains 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
use strict; | |
use warnings; | |
#単純に加算 | |
my $sum = 0; | |
for (1..999) | |
{ | |
if (($_ % 3) == 0) { $sum += $_; } | |
elsif (($_ % 5) == 0) { $sum += $_; } | |
} |
This file contains 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
//単純に加算 | |
var sum = 0; | |
for (var i = 1; i < 1000; i++) { | |
if ((i % 3) == 0) { | |
sum += i; | |
} else if ((i % 5) == 0) { | |
sum += i; | |
} | |
} | |
WScript.Echo(sum); |
This file contains 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
Option Explicit | |
'単純に加算 | |
Dim sum: sum = 0 | |
Dim i | |
For i = 1 To 999 | |
If i Mod 3 = 0 Then | |
sum = sum + i | |
ElseIf i Mod 5 = 0 Then | |
sum = sum + i |
This file contains 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
$global:it = New-Object -ComObject iTunes.Application | |
while($global:it -eq $null) | |
{ | |
Start-Sleep 1 | |
} | |
$global:artist_name = "" | |
$global:album_name = "" | |
$global:truck_name = "" | |
$global:truck_no = 0 |
This file contains 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
var acOutputReport = 3; | |
var acViewPreview = 2; | |
var acFormatXLS = "Microsoft Excel (*.xls)"; | |
var acFormatRTF = "Rich Text Format (*.rtf)"; | |
var acFormatSNP = "Snapshot Format (*.snp)"; | |
var acFormatHTML = "HTML (*.html)"; | |
var acApp = WScript.CreateObject("Access.Application"); | |
acApp.OpenCurrentDatabase(WScript.Arguments(0)); | |
acApp.Visible = true; |
This file contains 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
$acOutputReport = 3 | |
$acViewPreview = 2 | |
$acFormatXLS = "Microsoft Excel (*.xls)" | |
$acFormatRTF = "Rich Text Format (*.rtf)" | |
$acFormatSNP = "Snapshot Format (*.snp)" | |
$acFormatHTML = "HTML (*.html)" | |
$ac = New-Object -ComObject Access.application | |
$ac.OpenCurrentDatabase($args[0]) | |
$ac.Visible = $true |
This file contains 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
<?php | |
define("AcOutputReport", 3); | |
define("AcViewPreview", 2); | |
define("AcFormatXLS", "Microsoft Excel (*.xls)"); | |
define("AcFormatRTF", "Rich Text Format (*.rtf)"); | |
define("AcFormatSNP", "Snapshot Format (*.snp)"); | |
define("AcFormatHTML", "HTML (*.html)"); | |
$acApp = new COM("Access.Application"); | |
$acApp->OpenCurrentDatabase($argv[1]); |