9511_workbook

solved exercises from algorithms & programming I (9511) prof. Cardozo
Index Commits Files Refs README
commit 37cb29600e24d0fdad5a46283083903b1cce12fa
parent d59227bc2cb4ab4e047ff20f918de68a658687a9
Author: klewer-martin <martin.cachari@gmail.com>
Date:   Fri, 12 Feb 2021 16:58:37 -0300

Update: Added ex02.c & ex03.c

Diffstat:
Aguia07/ex02.c | 14++++++++++++++
Aguia07/ex03.c | 16++++++++++++++++
2 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/guia07/ex02.c b/guia07/ex02.c
@@ -0,0 +1,14 @@
+#include <stdio.h>
+
+int main (void) 
+{
+    unsigned char a, b;
+
+    a = 0b11001010;
+    b = 0b10100101;
+
+    printf("a = %o\nb = %o\n", a, b);
+
+
+    return 0;
+}
diff --git a/guia07/ex03.c b/guia07/ex03.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+
+int main (void)
+{
+    unsigned int a, b, c, d;
+
+    a = 0157;
+    b = 0701;
+    c = 0673;
+    d = 067;
+    
+    printf("%o\n%o\n%o\n%o\n", a<<1, b<<2, c>>2, d>>3);
+
+    return 0;
+
+}