COMPUTER PROGRAMMING
1.
2.
3.
PROGRAMME
SECTION /
GROUP
DATE
1.
NAME OF
INSTRUCTOR(S)
2.
1
Section 1: Program Design 1
Write a program that accepts a number between 1 to 12 and display the name of
the corresponding month. For example if the user types '1' the program will display
'January', if the user types '2' the program will display 'February' and so on.
If user types in numbers other than 1 to 12, program will display an invalid message
to warn the user.
You are required to use switch for the month selection part.
Copy+paste your program code and submit it with your lab report.
Invalid input!
Invalid input!
2
Section 2: Program Design 2
You are required to design a program to calculate BMI (Body Mass Index). The formula
for BMI is:
𝑀𝐴𝑆𝑆 (𝑘𝑔)
𝐵𝑀𝐼 =
𝐻𝐸𝐼𝐺𝐻𝑇(𝑚)2
Table 1
Figure 1