You are on page 1of 4

Module 4 2023

❖ Course Code: INS2020.


❖ Lecturer: Dr. Ngoc Thanh Pham.

1. Question 1
Calculate the following integral
𝑎2
𝑔(𝑥) = ∫ (𝑐1 𝑥 + 𝑐2 )𝑑𝑥
𝑎1

Hint:
𝑎2
𝑎
𝑔(𝑥) = ∫ (𝑐1 𝑥 + 𝑐2 )𝑑𝑥 = (0.5𝑐1 𝑥 2 + 𝑐2 𝑥)|𝑎21
𝑎1
= (0.5𝑐1 𝑎2 2 + 𝑐2 𝑎2 ) − (0.5𝑐1 𝑎1 2 + 𝑐2 𝑎1 )
And with known values of 𝑎1 , 𝑎2 , 𝑐1 , 𝑐2 , g(x) can be obtained

1
2. Question 2
Insert data a, b then calculate the area of a rectangle where the length is equal
to 2a + b and the width is a – 2b

3. Question 3
A student applied to a university in Hanoi, write a Code to show the application status.
The university requires results of Mathematic exam (0-10 marks) and IELT score
(band scores: 0.0-9.0).
✓ The application status is “success” if the total marks is not less than 12, where
IELTs must larger than 5.0.
✓ Furthermore, the status is “Scholarship” if the student has both math points >
9.0 or IELTS >8.0.
✓ Otherwise, the status is “ Thank for your application”

2
4. Question 4
Given a positive integer n. Count the number of digits of the positive integer n.

5. Question 5
Insert five arbitrary number. Find the largest of five numbers.

3
6. Question 6
a) Enter from the keyboard the positive integer n. Calculate the sum of the
digits in n

b) Enter the positive integer n from the keyboard. Calculate the result of
multiplying the digits in n.

Enjoy your Exercise

You might also like