aboutsummaryrefslogtreecommitdiff
path: root/exam00/rendu/maff_alpha
diff options
context:
space:
mode:
Diffstat (limited to 'exam00/rendu/maff_alpha')
-rwxr-xr-xexam00/rendu/maff_alpha/maff_alpha.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/exam00/rendu/maff_alpha/maff_alpha.c b/exam00/rendu/maff_alpha/maff_alpha.c
new file mode 100755
index 0000000..416dc0d
--- /dev/null
+++ b/exam00/rendu/maff_alpha/maff_alpha.c
@@ -0,0 +1,21 @@
+#include <unistd.h>
+
+void ft_putchar(char c)
+{
+ write(1, &c, 1);
+}
+
+int main(void)
+{
+ char ch = 'a';
+ while (ch <= 'z')
+ {
+ if (ch % 2 == 0)
+ ft_putchar(ch - 'a' + 'A');
+ else
+ ft_putchar(ch);
+ ch++;
+ }
+ ft_putchar('\n');
+ return 0;
+}