Skip to content

Commit 27a4f42

Browse files
committed
fix: standardize counter range
1 parent be90278 commit 27a4f42

19 files changed

+23
-23
lines changed

solutions/Punishment_java.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class Punishment
22
{
33
public static void main(String[] args) {
44
int count;
5-
for (count=0; count<500; ++count)
5+
for (count=1; count<=500; ++count)
66
System.out.println("I will not throw paper airplanes in class.");
77
}
88
}

solutions/punishment_awk.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BEGIN {
2-
for (count=0;count<500;++count) {
2+
for (count=1;count<=500;++count) {
33
print "I will not throw paper airplanes in class."
44
}
55
}

solutions/punishment_bash.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
for (( count=0; count<500; ++count )); do
1+
for (( count=1; count<=500; ++count )); do
22
echo "I will not throw paper airplanes in class."
33
done

solutions/punishment_cpp.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <iostream>
22

33
int main() {
4-
for (int count=0; count<500; ++count) {
4+
for (int count=1; count<=500; ++count) {
55
std::cout << "I will not throw paper airplanes in class." << std::endl;
66
}
77
}

solutions/punishment_cs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
public class Punishment {
22
public static void Main() {
3-
for (int count=0; count<500; ++count) {
3+
for (int count=1; count<=500; ++count) {
44
System.Console.WriteLine("I will not throw paper airplanes in class.");
55
}
66
}

solutions/punishment_dart.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
main() {
2-
for (var count=0; count<500; ++count) {
2+
for (var count=1; count<=500; ++count) {
33
print('I will not throw paper airplanes in class.');
44
}
55
}

solutions/punishment_go.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import "fmt"
44

55
func main() {
6-
for count := 0; count < 500; count++ {
6+
for count := 1; count <= 500; count++ {
77
fmt.Println("I will not throw paper airplanes in class.")
88
}
99
}

solutions/punishment_groovy.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
for (count=0; count<500; ++count) {
1+
for (count=1; count<=500; ++count) {
22
Console.println("I will not throw paper airplanes in class.")
33
}

solutions/punishment_ics.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
count = 0;
2-
do while count < 500 then
1+
count = 1;
2+
do while count <= 500 then
33
print("I will not throw paper airplanes in class.");
44
count = count +. 1
55
end

solutions/punishment_inf.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[ Main index;
2-
for (index=0: index<500: index++)
1+
[ Main count;
2+
for (count=1: count<=500: count++)
33
print "I will not throw paper airplanes in class.^";
44
];

0 commit comments

Comments
 (0)