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 | |
Private cnt: cnt = 0 | |
Private max: max = 0 | |
Call main | |
WScript.Echo "CNT = " & cnt | |
WScript.Echo "MAX = " & max |
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 prev: prev = 1 | |
Dim curr: curr = 2 | |
Dim sum: sum = 0 | |
Do While curr <= 4000000 | |
WScript.Echo curr | |
If curr mod 2 = 0 Then | |
sum = sum + curr | |
End If |
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 | |
foreach ($i in 1..999) | |
{ | |
if (($i % 3) -eq 0) | |
{ | |
$sum += $i | |
} | |
elseif (($i % 5) -eq 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
<?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
#単純に加算 | |
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
$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 |