Page 188 - CA_Blue( J )_Class9
P. 188
39 System.out.println("Total Marks: "+Total);
40 System.out.println("Percentage : "+Perc);
41 System.out.println("Grade: "+grade);
42 }
43 }
You will get the following output:
Let’s Revisit
There are three types of flow of control that is related to programming. They are Normal flow of control,
Conditional flow of control and Multiple branching of control.
Normal flow of control is the default procedure by which the control of the program code executes in a sequential
manner.
When according to the need of the programmer, the flow of a program is altered depending on a condition, it is
known as the conditional flow of control
Use of Ternary Operator: This is another way of representing simple if-else statements: It is a special operator with
two symbols (?,:) and containing three operands or expressions.
Multiple Branching statement allows the selection of any one case out of the number of cases provided in the
coding is defined as Switch Case Statement.
186 Touchpad Computer Applications-IX

