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

Write a program that will perform and display the results of math functions based on user
input of an integer value
Use the scanf() function to get integer input from the user.
Use a loop to continually prompt the user for another number to process, let the number 0
indicate Exit or Quit the program.
Implement the following two math functions in two separate .c files (fun1.c and fun2.c):
fun1.c: Given an integer value as a parameter, return the square of the given integer
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.
The main() function should:
prompt the user to input an integer value in a loop
exit the loop when the user enters a zero (0)
call each of the two math functions to get the results, and print the results as:
The square of 1st2nd%i%6.2f
Write a program that will perform and display the

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!