From 381984bfbce2da95ac19ddcbb530817f93743b10 Mon Sep 17 00:00:00 2001 From: daviddoji Date: Mon, 12 Jul 2021 19:49:40 +0200 Subject: [PATCH] Module 4: Load a grid (part 1) --- a.c | 12 +++++++++++- a.py | 11 ++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/a.c b/a.c index e7f955b..9da6c8e 100644 --- a/a.c +++ b/a.c @@ -1,4 +1,5 @@ #include // library for printing +#include // support for strings using namespace std; // For compiling C++ code @@ -6,5 +7,14 @@ using namespace std; int main() { - cout << 1 + 1 << "\n"; + string s0 = "DOG...."; + string s1 = "---...."; + string s2 = "----..."; + string s3 = "-------"; + string s4 = "...----"; + string s5 = "....---"; + string s6 = "....CAT"; + + s0.append("EXTRA!!"); + cout << "s0 is now: " << s0 << "\n"; } \ No newline at end of file diff --git a/a.py b/a.py index 7d4fd7d..a3a9811 100644 --- a/a.py +++ b/a.py @@ -1,2 +1,11 @@ if __name__ == "__main__": - print(1+1) \ No newline at end of file + s0 = "DOG...." + s1 = "---...." + s2 = "----..." + s3 = "-------" + s4 = "...----" + s5 = "....---" + s6 = "....CAT" + + s0 += "EXTRA!!" + print(s0) \ No newline at end of file