Permalink
Browse files

added first ruby

  • Loading branch information...
David Parker
David Parker committed Apr 15, 2009
1 parent b120653 commit 5e5e1d76fe84443d1d583cc56c5bacc9fe2e2ed6
View
0 README 100644 → 100755
No changes.
View
6 javascript/0001.html 100644 → 100755
@@ -3,9 +3,9 @@
<script>
var total = 0;
for (var i = 0; i < 1000; i++){
-if ((i % 3 === 0) || (i % 5 === 0)){
-total += i;
-}
+ if ((i % 3 === 0) || (i % 5 === 0)){
+ total += i;
+ }
}
document.write(total);
</script>
View
0 javascript/0002.html 100644 → 100755
No changes.
View
0 javascript/0003.html 100644 → 100755
No changes.
View
0 javascript/0004.html 100644 → 100755
No changes.
View
0 javascript/0005.html 100644 → 100755
No changes.
View
0 javascript/0006.html 100644 → 100755
No changes.
View
0 javascript/0007.html 100644 → 100755
No changes.
View
0 javascript/0008.html 100644 → 100755
No changes.
View
@@ -0,0 +1,5 @@
+sum = 0
+(1..999).each do |x|
+ sum += x if (x % 3 == 0 || x % 5 == 0)
+end
+puts sum

0 comments on commit 5e5e1d7

Please sign in to comment.