Answered step by step
Verified Expert Solution
Question
1 Approved Answer
the first picture is the problem the second is a sample , please write it using c language and make sure it actually work .
the first picture is the problem the second is a sample , please write it using c language and make sure it actually work .
Write an interactive program that displays a menu containing many choices as shown below: 1- split a real number 2-check if a number is perfect square 3-check if a number is odd 4- Exit You have to write 5 functions as indicated below: Function 1 to display the choices shown above Function 2 to receive a real value and returns its whole and decimal parts separated Function 3 is to read a positive integer and returns it. This function has to make sure that the input is positive before it returns it. It will be used for choices 2 and 3 Function 4 is a logical function that receives a positive integer number and returns 1 if it is perfect square, 0 otherwise. Perfect squares are 4,9,16,25 etc... Function 5 is also a logical function to check if an integer number is odd or not. In the main function, your program will ask the user to select a choice then, read the data and call the right function and print the right message. Sample runs of your programs are shown below Note: The functions allowed to have printf and/or scanf are the function that displays the choices and the function that reads a positive integer. The remaining 3 functions are not allowed to have any call to scanf or printf functionsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started