Page 99 - iPro_trackGPT_V5_Class8
P. 99

Digital Drills                                               #Coding & Computational Thinking



                       Write a Java program by using the switch statement to display the day name according
                      to the number of the day.
                       Write a Java program to print the following pattern:
                      *
                      **
                      ***
                      ****
                      *****
                       Write a Java program to print numbers from 10 to 1 using a do-while loop.

                       Write a Java program to print the sum of squares of numbers from 1 to 5.
                       Write a Java program to print a list of cubes of numbers 1 to 10.
                       Write a Java program to check if a person is eligible to vote or not.
                       Write a Java program to check if the year is leap year or not.
                       Write a Java program to determine the grade based on marks.





                 Teachers' Turf

                 1.   Discuss the various conditional statements in Java.
                 2.   Discuss how various loop structures can be applied to the same problem.
                 3.   Explain why loop and jump statements are essential components of programming.
                 4.   Discuss different types of errors in Java with examples.







































                                                                Conditional, Looping and Jump Statements in Java  97
   94   95   96   97   98   99   100   101   102   103   104