summaryrefslogtreecommitdiff
path: root/rushs/evalexpr/repeat
diff options
context:
space:
mode:
Diffstat (limited to 'rushs/evalexpr/repeat')
-rw-r--r--rushs/evalexpr/repeat/repeat.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/rushs/evalexpr/repeat/repeat.c b/rushs/evalexpr/repeat/repeat.c
new file mode 100644
index 0000000..06d0b43
--- /dev/null
+++ b/rushs/evalexpr/repeat/repeat.c
@@ -0,0 +1,11 @@
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+ if (argc != 3)
+ return 1;
+
+ for (int i = 0; i < argv[2][0] - '0'; i++)
+ puts(argv[1]);
+ return 0;
+}