aboutsummaryrefslogtreecommitdiff
path: root/exam00/cacharle/maff_alpha
diff options
context:
space:
mode:
authorCabergs Charles <cacharle@e-r6-p7.s19.be>2019-07-16 12:58:13 +0200
committerCabergs Charles <cacharle@e-r6-p7.s19.be>2019-07-16 12:58:13 +0200
commit66635d69fa00e335a091d7e6f2b358cbaaf205e4 (patch)
tree3ecf5a41b4541980ba0287a431681cd5ae25ad84 /exam00/cacharle/maff_alpha
parent11114fd684250943de56c4f73ab45c97f2aaf83a (diff)
downloadpiscine-66635d69fa00e335a091d7e6f2b358cbaaf205e4.tar.gz
piscine-66635d69fa00e335a091d7e6f2b358cbaaf205e4.tar.bz2
piscine-66635d69fa00e335a091d7e6f2b358cbaaf205e4.zip
c09 passed, c10 start, exam00 and exam01
Diffstat (limited to 'exam00/cacharle/maff_alpha')
-rwxr-xr-xexam00/cacharle/maff_alpha/maff_alpha.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/exam00/cacharle/maff_alpha/maff_alpha.c b/exam00/cacharle/maff_alpha/maff_alpha.c
new file mode 100755
index 0000000..416dc0d
--- /dev/null
+++ b/exam00/cacharle/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;
+}