Question: Problem 1: Write a program that has a function prime that takes a number as a parameter and return 1 if the number is a

 Problem 1: Write a program that has a function prime that

Problem 1: Write a program that has a function prime that takes a number as a parameter and return 1 if the number is a prime number, 0 if it is not a prime number Problem 2: Write a program that has a function that takes a number and returns it is factorial. Problem 3: Write a program that has a function that takes a number and returns its absolute value. Problem 4: Write a program to do the following. Ask the user to enter three numbers from the main. Then ask the user to choose option between 4 options 1- check if they are the same 2 - check if they are different 3- check if they are sorted 4 - Exit The following functions must be applied to answer user options. bool all_the_same(double x, double y, double z), returning true if the inputs are all the same bool all_different(double x, double y, double z), returning true if the inputs are all different. bool sorted(double x, double y, double z), returning true if x, y, z are sorted ascending

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 Databases Questions!