Commits

Lucian Brănescu-Mihăilă committed 1bf53a4

Ex 4 and 5

  • Participants
  • Parent commits e17d144

Comments (0)

Files changed (3)

 CFLAGS=-Wall -g
 
-all:
-	make ex1
-	make ex3
+programs = ex1 ex3 ex4
+
+all: $(programs)
 
 clean:
-	rm -f ex1 ex3
+	rm -f $(programs)
+#include <stdio.h>
+
+int main() {
+  int age = 10;
+  int height;
+
+  printf("I am %d years old.\n");
+  printf("I am %d inches tall.\n", height);
+
+  return 0;
+}
+#include <stdio.h>
+
+/* This is a comment. */
+int main(int argc, char *argv[])
+{
+    int distance = 100;
+
+    // this is also a comment
+    printf("You are %d miles away.\n", distance);
+
+    return 0;
+}