summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--error.txt2
-rw-r--r--primes.txt18
2 files changed, 19 insertions, 1 deletions
diff --git a/error.txt b/error.txt
index 14bcb38..417238e 100644
--- a/error.txt
+++ b/error.txt
@@ -1,3 +1,3 @@
def main(){
- print(if 1 kaas; else swag);
+ print(if 1 kaas; else swag; + 1);
}
diff --git a/primes.txt b/primes.txt
new file mode 100644
index 0000000..e693345
--- /dev/null
+++ b/primes.txt
@@ -0,0 +1,18 @@
+def checkprime(n){
+ i = 2;
+ s = int(sqrt(n));
+ while i <= s {
+ if n % i == 0 break;
+ i += 1;
+ }
+ return(i < s);
+}
+
+def main(argc,argv){
+ N = 100;
+ i = 2;
+ while i < N {
+ if checkprime(i) print(i);
+ i += 1;
+ }
+}