Clculate the circumference a circle input one number


Assignment: Functions

In this assignment, you will Design, C-code and Write a test plan for a program that performs the following task:

Write your own unique program that has a function call in the main inside a sentinel loop. Use the sentinel value -99 to exit the loop. The main should prompt the user for one number, then execute the function and display the results from the function.

The function should have one input Integer argument and return a Float value. The function that you MUST use is defined below.

If your Last Name begins with:
A-F - do no. 1
G-L - do no. 2
M-R - do no. 3
S-Z - do no. 4

1)Calculate the Area of a circle. Input: one number

2)Calculate the Circumference a circle. Input: one number

3)Convert the temperature from Celcius to Farenheit Input: one number

4)Convert the temperature from Farenheit to Celcius. Input: one number

There are 3 components of your submission including:

- DESIGN - Design your program using one of following three design tools:

Note: you need a design for both the main and the function

o Program Design (i.e. outline) - Make sure you include the start and end of the Loop and include any selection/decision conditions.

o Pseudo-code - Design your program using the pseudo-code commands

o Flowchart - Provide a flowchart for your design using the flowchart symbols that we learned in class. You can use Excel, Word, Powerpoint, Visio or any software you have available that will allow to draw shapes and connectors.

- TEST PLAN - Prepare at least 3 sets of input data (Test data) along with their expected output for testing your program. Your test data can be presented in the form of a table as follows (note: feel free to adapt to your design. Note: A test set is one execution of the program - NOT one loop.

- C-code - submit your C-code as a separate file (.txt or .c)

o Include a screen shot of the execution of you program.
o Make sure your C-code is documented with Header and in-line comments and properly indented.

The Design, Test Plan should be placed in a Word or PDF document for submission.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Clculate the circumference a circle input one number
Reference No:- TGS02278441

Now Priced at $35 (50% Discount)

Recommended (99%)

Rated (4.3/5)