Question: Must Use only code blocks CProgramming) 1) Write a simple calculator program with four operations: add, subtract, multiply, and divide. Create a separate function for
Must Use only code blocks CProgramming) 1) Write a simple calculator program with four operations: add, subtract, multiply, and divide. Create a separate function for each that returns the result of the operation (for example, an "add" function that returns the sum of two values). In the main0function, the program should ask the user to enter two numbers (floating point type) separated by a or character. The program should then call the appropriate function and display the result of the operation. Hint: for your input, use something like: Example Enter an arithmetic expression: 1.2 4.4 Result 5.280000 2) The mathematical constant "e" can be expressed as an infinite series: write a program that will print an approximate value of "e" by computing the series out to 1l where an integer entered by the user. In other words, calculate: e- 1 1/11 1/21 1! Note: "e" will be a floating point type. Hint: Use two "for" loops one to go through each term, and another to determine the factorial part for each term. 3) The Fibonacci numbers are o, 1, 1, 2, 3,5, 8, 13, where each number (after the first two values) is the sum of the previous two numbers. write a program that declares an integer arrav called fib numbers with a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
