Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 134 - 2626_South Point_C-7
P. 134

    Program  5: To find out if the student is selected  for the college or not based on the given
                       conditions 
                       1.  Selected if age > 18 and marks > 65.
                       2.  Not selected if age > 18 and marks < 65.
                       3. Not selected if age < 18.

                      On running the program given on the previous page, we get the following output:

                       Program 6: To check if the given number is lucky or not, if the given number is greater than zero
                       and is even, then print ‘Lucky number’ else print ‘Not a lucky number’.

                      132   Premium Edition-VII

| 129 130 131 132 133 134 135 136 137 138 139 |