Download DDC_1023_Test_3_Revision_Exercise - TCS VB

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
TECHNOLOGY COLLEGE SARAWAK
1. Based on the given decision table draw the equivalent flowchart.
Condition
age < 21
quietRequest = “Y”
assignedHall = “Addams”
assignedHall = “Grant”
assignedHall = “Lincoln”
T
T
X
Outcome
T
F
F
F
F
F
X
X
X
2. Based on a given flowchart of a switch-case structure for a multiple alternative
decisions:
i)
Draw the equivalent nested if flowchart
ii)
Write its C programming code segment using switch-case
3. Write a C program segment that performed 10 times of looping printing 10 lines
of “Hello”:
i)
Using while loop
ii)
Using for loop
iii)
Using while loop
4. Write a program to solve given problem requirement below:
Read 10 numbers of student scores for course work and final examination.
Calculate and print out the average score and the grade for each student. Then
determine how many students get grade C and above, and how many students
are below grade C. Display the results.
Page 1 of 1
DDC 1023
PROGRAMMING METHODOLOGY
Related documents