Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I am having some issues with C programming Language. Below is code that I need to write functions for (The parts for // write

Hello, I am having some issues with C programming Language. Below is code that I need to write functions for (The parts for // write code here, descriptions for what needs to happen are above that), but I'm a little new to C Programming Language and am struggling to come up with the functions I need to write. Any help would be greatly appreciated.

// U0Rx (VCP receive) connected to PA0

// U0Tx (VCP transmit) connected to PA1

#include "PLL.h"

#include "UART.h"

// **************Average3 Function*****************

// Write a function that calculates the average of three numbers

// Inputs: x,y,z 32-bit unsigned numbers

// Output: average of x,y,z

uint32_t Average3(uint32_t x, uint32_t y, uint32_t z){

// write code here

return 0; // replace this line with solution

}

// **************Max3 Function*****************

// Write a function that calculates the maximum of three numbers

// Inputs: x,y,z 32-bit unsigned numbers

// Output: maximum of x,y,z

uint32_t Max3(uint32_t x, uint32_t y, uint32_t z){

// write code here

return 0; // replace this line with solution

}

uint32_t Data[10]={100,200,500,300,400,700,300,0,600,400};

// **************Max10*****************

// Write a function that calculates the maximum of 10 numbers

// Inputs: 10 numbers in Data array

// Output: maximum of these 10 numbers

uint32_t Max10(void){

// write code here

return 0; // replace this line with solution

}

uint8_t Data2[4]={1,2,3,4}; // change it to 4,3,2,1

// **************Reverse4*****************

// Write a function that reverses the order of numbers in a 4-element array

// Inputs: 4 numbers in Data2 array

// Output: modify the array reversing the order

void Reverse4(void){

// write code here

}

uint8_t Data3[11]={0,1,2,3,4,5,6,7,8,9,10}; // change it to 10,9,8,7,6,5,4,3,2,1,0

// **************Reverse11*****************

// Write a function that reverses the order of numbers in an 11-element array

// Inputs: 11 numbers in Data3 array

// Output: modify the array reversing the order

void Reverse11(void){

// write code here

}

//testing code

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

Step: 3

blur-text-image

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

Advances In Database Technology Edbt 88 International Conference On Extending Database Technology Venice Italy March 14 18 1988 Proceedings Lncs 303

Authors: Joachim W. Schmidt ,Stefano Ceri ,Michele Missikoff

1988th Edition

3540190740, 978-3540190745

More Books

Students also viewed these Databases questions

Question

Compose the six common types of social business messages.

Answered: 1 week ago

Question

Describe positive and neutral messages.

Answered: 1 week ago