aboutsummaryrefslogtreecommitdiff
path: root/semestre 3/architecture des ordinateurs/tme/tme2/exo4.c.bp
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-09-26 12:24:19 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2025-09-26 12:24:19 +0200
commit9cb070097ebf4692ae2bcb23e854a3e4ffdccd53 (patch)
treec55c348daa1d1c1c34529a9d6c4e6f209f9a1a7b /semestre 3/architecture des ordinateurs/tme/tme2/exo4.c.bp
parent7ed2d38e36518873139d5fea9b977e9ae72e7838 (diff)
Cours du 22 au 26 septembre
Diffstat (limited to 'semestre 3/architecture des ordinateurs/tme/tme2/exo4.c.bp')
-rw-r--r--semestre 3/architecture des ordinateurs/tme/tme2/exo4.c.bp16
1 files changed, 16 insertions, 0 deletions
diff --git a/semestre 3/architecture des ordinateurs/tme/tme2/exo4.c.bp b/semestre 3/architecture des ordinateurs/tme/tme2/exo4.c.bp
new file mode 100644
index 0000000..53259cc
--- /dev/null
+++ b/semestre 3/architecture des ordinateurs/tme/tme2/exo4.c.bp
@@ -0,0 +1,16 @@
+#include <stdio.h>
+
+int main(){
+ char s[25];
+ for (int i = 0; i< 25; i++) s[i] = 0;
+ scanf("%s", s);
+ s[24] = '\0';
+ for (int i = 0; s[i] != '\0'; i++){
+ if (s[i] > 'Z' ) {
+ printf("%c\n", s[i]);
+ s[i] = (char) ((int) *s - ('a' - 'A'));
+ }
+ }
+ printf("%s\n", s);
+ return 0;
+}