ecure httpsixcsuoregonedunorriscis330indexcgin MainAssignmen

ecure https://ix.cs.uoregon.edu/~norris/cis330/index.cgi?n Main.Assignment2w17 t cs other 3. (20pts) In this problem you will use the triangle array you created in Problem 2, adding a new function print Number Mountain Create a header file mountain.h with the following contents: #ifndef MOUNTAIN H #define MOUNTAIN H Print a mountain consisting of numPeaks triangles. eparam num Peaks: number of mountain peaks eparam heights: an array of heights with numPeak elements eparam triangles: an array of triangles void print Numbe Mountain (const int numPeaks int heights, int ***triangles) #endif MOUNTAIN H Create a source file mountain.c containing the implementation of the printNumberMountain function, and call it from your main function, which should be in the mountain.c source file, do not add the new mountain code to the test.c from Problem 2). You can optionally use the triangle functions above if you can figure out how, but you don\'t have to. Compile and test. gcc std-c99 -o mountain mountain.c /mountain 3. (10 pts) Using a Makefile,

Solution

Lets create the header file first:

Copy the following code in notepad and save this file as mountain.h

now this is your main file :

scanf(\"%d\",&numPeaks);

 ecure https://ix.cs.uoregon.edu/~norris/cis330/index.cgi?n Main.Assignment2w17 t cs other 3. (20pts) In this problem you will use the triangle array you create

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site