Algorithm Design and Programming II Lab 1 (5 Points)

$24.99 $18.99

Objectives: Get Comfortable with the IDE. Solve some problems in C. Note: If your code does not compile with –Wall and –Werror, you will receive a zero for this assignment. Description: Implement a function, called compare, that compares two integers, a and b. If a <= b, then compute a – b, otherwise compute b…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

Objectives:

  • Get Comfortable with the IDE.

  • Solve some problems in C.

Note: If your code does not compile with –Wall and –Werror, you will receive a zero for this assignment.

Description:

Implement a function, called compare, that compares two integers, a and b. If a <= b, then compute a – b, otherwise compute b – a. This function takes two integers as inputs and stores the output difference of a and b in a pointer.

Every user-defined function must have a comment describing:

  1. What function does;

  1. What parameter values are;

  1. What value it returns.

You also need to finish at least three peer reviews within two days of this lab.

Otherwise, you will get 15% penalty.

Function Prototype:

  • void compare (int input1, int input2, int * output);

Grading Criteria:

Working function: 3 points

Main program to test: 1 point

Comments: 1 point

1

Algorithm Design and Programming II Lab 1 (5 Points)
$24.99 $18.99