Question: in basic c programming please solve question number one 1. A function. Write a function to compute the formula f(x) = (3x + 1) Write
1. A function. Write a function to compute the formula f(x) = (3x + 1) Write a main program that will sum f(x) for the values r=0 to x = 1000 in steps of 50. Print out the value of f(x) and the current sum at every step in a nice neat table. 2. Tables. Write a program that contains two function definitions: $1(n,) = Vnx x sin(nux) f2(n. 1) = V8 x cos(nx) e e where n is an integer and is a double. In the main program, input a value for x and restrict it to the range 0.1 SI 2.5. Print a neat table showing the values of f1(n,x) and 2(n,) as n goes from 0 to 30. Print column headings above the first line. Show all numbers to three decimal places. 3. Bubbles. Modify your program from computer exercise 3 in Chapter 7; change the bubble() function so that it takes both o andras parameters. Then change the main function to ask the user to enter a value for o is well. Define an error function that prints a message "Input out of range." Use it to screen out values men of less than 0.0002 or greater than 0.015 ft
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
