# C program ( #23, #24 )

Anonymous
account_balance_wallet \$15

Question description

please see the attachment in order to know what are the requirements. you should work on the C program, all what you have to do is to type the requirements in the C program , they are really easy

ECE 102 Assignment #23 This assignment has two parts. 1. Rewrite the odd function program in Assignment#10 as a function. Note: do not display the output inside this function. Pre-lab Assignment: Write the analysis and pseudocode for this function. 2. The next program should be named using the naming convention for this class. Using the function from above, write a main program that will generate a sample output shown below: Would you like to test the odd function? Type Y for yes and N for no. --> Y Please enter three binary numbers --> 1 0 1 The odd function output of 1, 0, and 1 is 0. Would you like to test the odd function again? --> Y Please enter three binary numbers --> 0 1 0 The odd function output of 0, 1, and 0 is 1. Would you like to test the odd function again? --> Y Please enter three binary numbers --> 0 1 1 The odd function output 0, 1, and 1 is 0. Would you like to test the odd function again? --> N The test is now over. Pre-lab Assignment: In this part of the assignment, you must use the odd function from part 1 to derive the output. 1. Write down a detailed analysis for this program. 2. Write down a detailed pseudocode. You must use a while loop in the pseudocode.
ECE 102 Assignment #24 The Taylor series of the natural logarithmic function at x = 0 is given by x2 x3 xn  ln(1  x )  x        , 2 3 n The constraint is -1 < x < 1. (1) Write a function LN_partial that calculates the partial sum of first n terms on the right hand side of the equation above. The LN_partial function should have two input arguments: x and n. Use a for loop in the function to calculate the running sum. (Use this assignment to review for loop and running sum!!!) Pre-lab Assignment: 1. Write down the first three steps of problem solving for the function LN_partial. 2. Write down the pseudo code for the function. 3. Trace the pseudo code. (2) Write a main program to test the LN_partial function. The main program should ask the user to enter x and n and display the output of the function LN_partial. The program should also calculate –ln(1-x) by using the built-in command log and compare it with the first result. Pre-lab Assignment: 1. Write down the first three steps of problem solving for the main program. 2. Write down the pseudo code for the main program. Include appropriate error checking. (Practice using loops for error-checking as a preparation for the final exam.)

brooke854
School: Duke University

1

C++ Program: Function LN_partial
Ali Almusallam
Institution Affiliation

ASSIGNMENT 24

2

Assignment #24
Write a function LN_partial that calculates the partial sum of first n terms on the right hand
side of the equation above. The LN_partial function should have two input arguments: x and
n. Use a ...

flag Report DMCA
Review

Anonymous
Outstanding Job!!!!

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors