Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello. I need some help with this assignment. Below are the following instructions I was given but I cant seem to get my code right.

Hello. I need some help with this assignment. Below are the following instructions I was given but I cant seem to get my code right.

Come up with your own function in C that accepts one input number and returns a double number. The themes for the functions should be one of the following:

Calculates 3.14 times of the square of input number. For example, if 2 is input then 12.56 should be returned. (e.g. 3.14*2*2 = 12.56)

Divides the number by 3 and returns the result. For example, if 6 was input then 2.0 should be returned.

image text in transcribed Squares the number and returns the result. For example, if 12.1 was entered then 146.41 would be returned. You should provide both your C code and an example call to the C code function. Be sure to provide an overview of what your function is doing. Include header documentation in the code as well as internal code documentation. Provide a screen capture showing the results of testing your code in an online compiler. Be sure to test your code with several test cases and show your test case table.

Files clang version .0.0-iubuntu2 (tagS/RELEASE 600/final) 1IC code // This progran will square a ater and return the results. 3I Developer: Monique Blanchard 15.75 The square of inputted nusber is: 248.06 (Rounded to 2 deciral peint D manzc 4 I Date: March 3, 2e19 Dnew2 #include 6 int maino s double number, square; printf("Enter Number:M"); Iprompts the user for a nunber scanf(i,nunber) 12 squares the nunber inputted and returns the result 4 calculates the square of the inputted number 15 printf("The square of nputted nurter is: %.21f (Ronded to 2 decinal point)",square); 16 The output of the result is in 2 decinal point 17 return Test Case 1

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

Oracle Database 10g Insider Solutions

Authors: Arun R. Kumar, John Kanagaraj, Richard Stroupe

1st Edition

0672327910, 978-0672327919

More Books

Students also viewed these Databases questions