Question: I need help programing this in C. Your task is to design and implement the following functions Description given an integer value, returns the same

I need help programing this in C.I need help programing this in C. Your task is to design

Your task is to design and implement the following functions Description given an integer value, returns the same integer rounded to the nearest multiple of 100 e.g., 137 would round down to 100, 153 would round up to 200, etc given an integer value, returns true if the integer is odd, and false if it is even given a number x (which is not necessarily an integer), returns the value of 3x6x + 12 given a temperature t in Celsius (not necessarily an integer), return the equivalent temperature in Fahrenheit, which is (t x 9/5) + 32 Function name roundToNearest100 isodd 0 celsiusToFahrenheit Part 1: Design For each function, create a design artifact, including input (parameters) and output (return value). Discuss your design with your neighbors. Did you agree on what parameters and parameter data types are needed? Did you agree on the return type? Part 2: Implementation and Testing For each function, add a prototype and function definition to the program. To test a function, add at least four assertions to the main function. An assertion tests a function by calling the function with hard coded values, and verifies that the correct result is returned. An example function called addInts is provided, along with several test assertions When you run the program, it will print All tests passed! if all of the tests succeed. Otherwise, you will see a message about a failed assertion. This means that either the function returned the wrong value, or the test is incorrect. Hints The bool type is appropriate for representing the values true and false A good way to specify an expected value for a function that does a numeric computation is to specify the expected value as the same computation on whatever hard-coded value or values were passed to the function. For example, to test the celsiusToFahrenheit function, you might specify the assertion as assert (celsiusToFahrenheit(49.5)((49.59.0) /5.0) 32.e); Your task is to design and implement the following functions Description given an integer value, returns the same integer rounded to the nearest multiple of 100 e.g., 137 would round down to 100, 153 would round up to 200, etc given an integer value, returns true if the integer is odd, and false if it is even given a number x (which is not necessarily an integer), returns the value of 3x6x + 12 given a temperature t in Celsius (not necessarily an integer), return the equivalent temperature in Fahrenheit, which is (t x 9/5) + 32 Function name roundToNearest100 isodd 0 celsiusToFahrenheit Part 1: Design For each function, create a design artifact, including input (parameters) and output (return value). Discuss your design with your neighbors. Did you agree on what parameters and parameter data types are needed? Did you agree on the return type? Part 2: Implementation and Testing For each function, add a prototype and function definition to the program. To test a function, add at least four assertions to the main function. An assertion tests a function by calling the function with hard coded values, and verifies that the correct result is returned. An example function called addInts is provided, along with several test assertions When you run the program, it will print All tests passed! if all of the tests succeed. Otherwise, you will see a message about a failed assertion. This means that either the function returned the wrong value, or the test is incorrect. Hints The bool type is appropriate for representing the values true and false A good way to specify an expected value for a function that does a numeric computation is to specify the expected value as the same computation on whatever hard-coded value or values were passed to the function. For example, to test the celsiusToFahrenheit function, you might specify the assertion as assert (celsiusToFahrenheit(49.5)((49.59.0) /5.0) 32.e)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!