Declare and define user-defined function \" minimum\" thatwill take 3 integers a
ID: 3613993 • Letter: D
Question
Declare and define user-defined function "minimum" thatwill take 3 integers as arguments/parameters, and will compute andreturn the minimum of the 3 numbers. inside main() --Ask the user to enter an integer between 10 abd 20. assign it to NUM(example NUM15) --Generate three random numbers between 1 and NUM (integers).name them num1, num2, num3.(all the 3 numbers HAVE TO BEDIFFERENT --Print the 3 random numbers -- call the user-defined function "minnimum" that takesnum1,num2,num3 as arguments/parameters and returns the minimum ofthe 3 --assign the minimum number to minimum value print the minimum value _____the output should look like this_____ Enter an integer between 10 and 20:*** The random numbers are ***,***,*** The minimum number is :*** Declare and define user-defined function "minimum" thatwill take 3 integers as arguments/parameters, and will compute andreturn the minimum of the 3 numbers. inside main() --Ask the user to enter an integer between 10 abd 20. assign it to NUM(example NUM15) --Generate three random numbers between 1 and NUM (integers).name them num1, num2, num3.(all the 3 numbers HAVE TO BEDIFFERENT --Print the 3 random numbers -- call the user-defined function "minnimum" that takesnum1,num2,num3 as arguments/parameters and returns the minimum ofthe 3 --assign the minimum number to minimum value print the minimum value _____the output should look like this_____ Enter an integer between 10 and 20:*** The random numbers are ***,***,*** The minimum number is :***Explanation / Answer
please rate - thanks #include #include using namespace std; int min(int,int,int); int main() {int num,num1,num2,num3; srand(time(0)); do{ coutnum; }while(num20); num1=rand()%num+1; do{ num2=rand()%num+1; }while(num2==num1); do{ num3=rand()%num+1; }while(num3==num1||num3==num2); coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.