Question: Write a program that will perform and display the results of math functions based on user input of an integer value 2 . Use the

Write a program that will perform and display the results of math functions based on user
input of an integer value
2. Use the scanf() function to get integer input from the user.
3. Use a loop to continually prompt the user for another number to process, let the number 0
indicate Exit or Quit the program.
4. Implement the following two math functions in two separate .c files (fun1.c and fun2.c):
1. fun1.c: Given an integer value as a parameter, return the square of the given integer
2. fun2.c: Given an integer value as a parameter, return the next integer (i.e. add 1)
Create a main.c (in a separate 3rd file) which has the main() function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!