Instructions 1. Download the starter package from Canvas, you are given 2 template files: main.cpp. Makefile, and 3 test
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Instructions 1. Download the starter package from Canvas, you are given 2 template files: main.cpp. Makefile, and 3 test
c. Load each column starting from the second line of input.txt respectively into A, B, and C. E.g. A will become [1, 3, 5, 7, 9], B=(2, 4, 6, 8, 10], and likewise C [3, 5, 7, 9, 11]. = d. Call the sub function with sub(n, A, B, C); and write the function's result into a new file output.txt. 3. Change the given Makefile so that your code compiles into a working binary program that executes the implementations above. Rubrics We will measure your performance based on the following checklist: 1. You have turned in an appropriate Documentation readme. (1pt) 2. You have turned in an appropriately modified Makefile. (1pt) 3. Your code generates correct outputs with the grader's own test input files. (2pt) 4. Your code handles File I/O and Dynamic Memory Allocation correctly. (1pt) We will build your program with the Makefile you turn in. E.g. If your code fails to build on the general ASU server, then you will get at most (1/5). What to Turn In, One More Time . A zip/tar archive containing the following: omain.cpp Makefile O 0 O A README.txt with your name in it that documents what your program is doing ** You DO NOT need to turn in sub.o, input.txt and output.txt since they will be replaced anyways during grading
D main.cpp X 1 2 8 9 10 HENHE OHNM456 11 12 13 14 15 16 #include "sub.h" #include <iostream> #include <fstream> int main() 8( } int n; // Your work starts here // int result = sub (n, A, B, C); return 0; 1
File Edit Search View Encoding Language Settings Tools Macro Run Plugins |pc| 1 main.cpp X 1 input txt X Makefile X sub.h X int sub (int n, int *A, int *B, int *C);