0% found this document useful (0 votes)
24 views2 pages

Programming Online Morning Sem Final 2024

C programing

Uploaded by

Rabby Ahamad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views2 pages

Programming Online Morning Sem Final 2024

C programing

Uploaded by

Rabby Ahamad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

World University of Bangladesh

Department of Computer Science and Engineering


Semester Final Examination
Course title: Introduction to Programming, Course code: CSE 06131209

Time: 2 Hours Marks: 40


Answer any four of the following six questions
Perform the following activities for each of the below provided problem statements.
a. Write a pseudocode (step by step procedure to solve the problem)- 2 marks
b. Draw a flow-chart- 4 marks
c. Write a C program- 4 marks

1. Calculate the sum of a five-digit number where the input is provided through the
keyboard. (Solve this using simple I/O operation. Do not use Loop-control,
Function or Array).

2. An Insurance company follows following rules to calculate premium. i) If a


person’s health is excellent and the person is between 25 and 35 years of age and
lives in a city and is a male then the premium is Taka. 40 per thousand and his
policy amount cannot exceed taka. 2 lakhs.
ii) If a person satisfies all the above conditions except that the sex is female then the
premium is taka. 30 per thousand and her policy amount cannot exceed taka. 1
lakh.
iii) If a person’s health is poor and the person is between 25 and 35 years of age and
lives in a village and is a male then the premium is taka. 60 per thousand and his
policy cannot exceed taka. 50,000.
iv) In all other cases the person is not insured. Write a program to output whether the
person should be insured or not, his/her premium rate and maximum amount for
which he/she can be insured. (Solve using the concepts of conditional branching)

3. Determine total fare of a CNG Auto Rickshaw ride according to the provided fare
chart where the distance traveled is input through keyboard. The fair calculation also
takes a one-of waiting time into consideration:
For first 05 kilometers Tk. 50/km
For next 10 kilometers Tk. 45/km
For next 30 kilometers Tk. 40/km
For waiting time above 10 Minutes an additional surcharge of 15% is added to the
total fare. (Solve using the concepts of conditional branching)

1
World University of Bangladesh
Department of Computer Science and Engineering
Semester Final Examination
Course title: Introduction to Programming, Course code: CSE 06131209

4. The minimum wage of a country today is TK. 25,000 per month. The minimum wage
has increased steadily at the rate of 3% per year for the last 10 years. Write a
program to determine the minimum wage at the end of each year in the last decade.
(Solve using the concepts of loop controls)

5. Write a function that receives 2 integers to calculate the sum, average and multiplication
of these numbers. Call this function from main () and print the results in main (). (Solve
the problem using the concepts of functions)

6. Create an array of N length. Receive the elements of the array as user input and store
them in the array. Now put the even & odd elements of the array in 2 separate
arrays and print the two array to show the odd and even elements of the array.

You might also like