BIT1034 - Assignment 1
BIT1034 - Assignment 1
INSTRUCTIONS
Use C#.NET 2017 or higher
Do ALL questions.
Write ONE program for each question.
Use suitable labels for your output.
1) Given the names and marks of n=7 students as in the code snippet below:
EXAM RESULTS
Minimum = 40
Maximum = 95
Average = 66.14
2) A factory has n=12 staff who are paid RM9.50 per hour. Their wages are calculated as follows:
PAYROLL REPORT
(a) How many of the numbers in x fall in the range: (i) 1000-2499, (ii) 2500-4999, (iii) 5000-7499 and (iv)
7500-9999?
(b) How many of the numbers in x are (i) even and (ii) divisible by 5?
4) Write a program using function(s) to calculate the area and circumference of n=5 circles with radii r = 5.5,
6.6, 7.7, 8.8, 9.9 (rounded to 2 decimal places).
6) Create a text file called contacts to store n=10 records, each with fields name, sex, age, telephone and
email address as follows:
Write a program to read and display all the fields of each record.
7) Write a program to generate n=5 7-character passwords using the following categories:
Uppercase: A to Z
Lowercase: a to z
Digits: 0 to 9
Special characters: @ $ # ? % & * (no blank space)
8) Generate integer random numbers in the range [100, 999] in a 2-dimensional array x with m=5 rows, n = 8
columns. Calculate the minimum, maximum, sum, average (rounded to 2 decimal places).