Professional Documents
Culture Documents
INSTRUCTIONS TO CANDIDATES
Page 1 of 97
CONFIDENTIAL 202104/FSC111/A
#include <stdio.h>
⋮
int main()
{
int number[3], n=0;
⋮
switch(n)
{
⋮
}
⋮
}
Examples of the results are as follow. Please solve the problem with switch…case statement
to have different branches and follow the input and output format of the results as shown
below.
Page 2 of 97
CONFIDENTIAL 202104/FSC111/A
Write a program to input the number of row(s) m and the number of column(s) n from
keyboard, then get the m× nmatrix a. Each element’s value in the matrix a should satisfy
a [ i ][ j ] =2 ×i+3 × j
where, 1 ≤i ≤m , 1≤ j ≤n. Examples of the results are as follow. Please solve the problem with
nested while loop (Both inner loop and outer loop are both while loop), and follow the input
and output format of the results as shown below.
Page 3 of 97
CONFIDENTIAL 202104/FSC111/A
Examples of the results are as follow. Please solve the problem with function(s) and follow
the input and output format of the results as shown below.
Write a program to input each staff’s information of a company (Including name, status of
Covid-19 vaccination (As shown in table.1), and age), then for those who have completed the
2nd dose of Covid-19 vaccination, list their names and calculate their average age, assuming
the company has 5 staffs. (Please ignore the case that no one has completed the 2 nd dose of
Covid-19 vaccination.)
Page 4 of 97
CONFIDENTIAL 202104/FSC111/A
Examples of the results are as follow. Please solve the problem with structure(s) and
function(s), and follow the input and output format of the results as shown below.
Page 5 of 97
CONFIDENTIAL 202104/FSC111/A
Page 6 of 97
CONFIDENTIAL 202104/FSC111/A
- END OF PAPER -
Page 7 of 97