Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(a) Write the definition for a void function larger that takes two integer argum

ID: 3652383 • Letter: #

Question

(a) Write the definition for a void function larger that takes two integer arguments value1 and value2 and swaps their values if value1 is greater than value2. (b) Write a main function definition that obtains two integer input value from the console and print them out in increasing order (smaller value first, larger value second). Do not use any control statement (if-else) refer using the function from part (a) to rearrange the parameters in proper order. (c) Writer the definition for a function name even that takes a single integer argument and return true if the value is even, false otherwise.

Explanation / Answer

void large(int *value1,int *value2) { int *s; if(*value1>*value2) { *s=*value1; *value1=*value2 *value2=*s; } } void main() { int *x,*y; cin>>*x>>*y; larger(x,y); cout