Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am having some problems with some C programming language. I have developed code for my class that I am part of but I am

I am having some problems with some C programming language. I have developed code for my class that I am part of but I am getting errors and they are on things I thought I did. Could use some help figuring out how to fix theses errors, which are on the bottom picture. (The gmake error can be ignored, as I need help with the ones above it.

image text in transcribed

image text in transcribed

image text in transcribed

Author: Macho 8 #include // preprocessor directive to include file 9 // U Rx (VCP receive) connected to PAO 10 // UOTX (VCP transmit) connected to PA1 12 #include "PLL.h" 13 #include "UART.h" 14 15 // **************Average3 Function***************** 16 // Write a function that calculates the average of three numbers 17 // Inputs: x,y,z 32-bit unsigned numbers 18 // Output: average of x,y,z 19 uint32_t Average3(uint32_t x, uint32_t y, uint32_t z) 20 { 21 //returns the average of the 3 numbers 22 return (x+y+z)/3; 23 } 24 // *****************Max Function******************* 25 // Write a function that calculates the maximum of three numbers 26 // Inputs: x,y,z 32-bit unsigned numbers 27 // Output: maximum of x,y,z 28 uint32_t Max3(uint32_t x, uint32_t y, uint32_t z) 29 { 30 // initialises max to the first number 31 uint32_t max = x; 32 //if max is less than the second number then assign second number to max 33 if(max max) 55 max = Data[i]; 56 //returns the max of the array 57 return max; 58} 59 //array to be reversed 60 uint8_t Data2[4]={1,2,3,4}; // change it to 4,3,2,1 61 // **************Reverse4***************** 57 return max; 58} 59 //array to be reversed 60 uint8_t Data2[4]={1,2,3,4}; // change it to 4,3,2,1 61/ / ***************Reverse 4**************** 62 // Write a function that reverses the order of numbers in a 4-element array 63 // Inputs: 4 numbers in Data2 array 64 // Output: modify the array reversing the order 65 void Reverse4(void) 66 67 //traverse from start to half of the array 68 // swap the i-th element of the array with the element in position "3-i" 69 for(int i=0; i // preprocessor directive to include file 9 // U Rx (VCP receive) connected to PAO 10 // UOTX (VCP transmit) connected to PA1 12 #include "PLL.h" 13 #include "UART.h" 14 15 // **************Average3 Function***************** 16 // Write a function that calculates the average of three numbers 17 // Inputs: x,y,z 32-bit unsigned numbers 18 // Output: average of x,y,z 19 uint32_t Average3(uint32_t x, uint32_t y, uint32_t z) 20 { 21 //returns the average of the 3 numbers 22 return (x+y+z)/3; 23 } 24 // *****************Max Function******************* 25 // Write a function that calculates the maximum of three numbers 26 // Inputs: x,y,z 32-bit unsigned numbers 27 // Output: maximum of x,y,z 28 uint32_t Max3(uint32_t x, uint32_t y, uint32_t z) 29 { 30 // initialises max to the first number 31 uint32_t max = x; 32 //if max is less than the second number then assign second number to max 33 if(max max) 55 max = Data[i]; 56 //returns the max of the array 57 return max; 58} 59 //array to be reversed 60 uint8_t Data2[4]={1,2,3,4}; // change it to 4,3,2,1 61 // **************Reverse4***************** 57 return max; 58} 59 //array to be reversed 60 uint8_t Data2[4]={1,2,3,4}; // change it to 4,3,2,1 61/ / ***************Reverse 4**************** 62 // Write a function that reverses the order of numbers in a 4-element array 63 // Inputs: 4 numbers in Data2 array 64 // Output: modify the array reversing the order 65 void Reverse4(void) 66 67 //traverse from start to half of the array 68 // swap the i-th element of the array with the element in position "3-i" 69 for(int i=0; i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions

Question

1. What are your creative strengths?

Answered: 1 week ago

Question

What metaphors might describe how we work together?

Answered: 1 week ago