3212 - EE2310 Week1 Practice Scoreboard

Time

2025/09/01 08:00:00 2025/12/31 23:59:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
14651 Compute rectangle perimeter and area
14653 Find the maximum of three integers

14651 - Compute rectangle perimeter and area   

Description

Write a C program to compute the perimeter and area of a rectangle with inputted height and width. 

Input

Two integer numbers, width and height.

 

Output

Two integer numbers, perimeter and area

Ensure that the output, including formatting, exactly matches the provided samples.

Sample Input  Download

Sample Output  Download




Discuss




14653 - Find the maximum of three integers   

Description

Write a C program that accepts three integers and finds the maximum of three.

Note that you can use "comparision" operator to do this exercise. However, it is suggested to use the following format instead: 

Assume x, y and z are three inputted integers:

  • temp = (x + y + abs(x - y)) / 2;

  • max = (temp + z + abs(temp - z)) / 2; 

​Note that abs here stands for the absolute value. Also, in order to use abs function, you have to include <stdlib.h> first. 

Input

Three input integers

Output

The maximum of the inuput integers.

Ensure that the output, including formatting, exactly matches the provided samples.

Sample Input  Download

Sample Output  Download




Discuss