Structured Programming Lab
CIS · Final · Fall 23
Read the questions as text
Read off the PDF by AI, so it may have mistakes. The PDF is the original.
Daffodil International University
Department of Computing and Information System
Faculty of Science & Information Technology
Lab Final Examination, Fall 2023
Course Code: CIS 115L
Course Title: Structured Programming Lab
Time: 70 min
Marks: 40
[The figures in the right margin indicate the full marks]
1. [10 marks]
Read three values (variables A, B and C), which are the three student's grades. Then, calculate the average, considering that grade A has weight 2, grade B has weight 3 and the grade C has weight 5. Consider that each grade can go from 0 to 10.0, always with one decimal place.
Input
The input file contains 3 values of floating points (double) with one digit after the decimal point.
Output
Print the message "MEDIA" (average in Portuguese) and the student's average according to the following example, with a blank space before and after the equal signal.
Input Samples | Output Samples
5.0
6.0
7.0 | MEDIA = 6.3
5.0
10.0
10.0 | MEDIA = 9.0
10.0
10.0
5.0 | MEDIA = 7.5
2. [10 marks]
In this problem you have to read an integer value and calculate the smallest possible number of banknotes in which the value may be decomposed. The possible banknotes are 100, 50, 20, 10, 5, 2 and 1. Print the read value and the list of banknotes.
Input
The input file contains an integer value N (0 < N < 1000000).
Output
Print the read number and the minimum quantity of each necessary banknotes in Portuguese language, as the given example. Do not forget to print the end of line after each line, otherwise you will receive "Presentation Error".
Input Sample | Output Sample
576 | 576
5 nota(s) de R$ 100,00
1 nota(s) de R$ 50,00
1 nota(s) de R$ 20,00
0 nota(s) de R$ 10,00
1 nota(s) de R$ 5,00
0 nota(s) de R$ 2,00
1 nota(s) de R$ 1,00
11257 | 11257
112 nota(s) de R$ 100,00
1 nota(s) de R$ 50,00
0 nota(s) de R$ 20,00
0 nota(s) de R$ 10,00
1 nota(s) de R$ 5,00
1 nota(s) de R$ 2,00
0 nota(s) de R$ 1,00
503 | 503
5 nota(s) de R$ 100,00
0 nota(s) de R$ 50,00
0 nota(s) de R$ 20,00
0 nota(s) de R$ 10,00
0 nota(s) de R$ 5,00
1 nota(s) de R$ 2,00
1 nota(s) de R$ 1,00
3. [10 marks]
Write a program that reads a circle's radius and displays the circle's area.
4. [10 marks]
Write a program that reads three numbers and displays medium.