Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 134 - 2609_Logiccode
P. 134

    Program: To print the message based on the marks entered. Display the messages:

                      1.   If the marks are less than 35, display the message ‘Sorry!!!, You have failed the exam’.
                      2.   If the marks are less than or equal to 60 display the message ‘Passed with C grade’.

                      3.   If the marks are greater than 60 and less than or equal to 85 display the message ‘Passed
                          with B grade’.

                      4.   If none of the condition evaluates to true, then display the message ‘Passed with A grade’.

                      On running the above program, you will get the following output:

                                          To Indent the line                          To Unindent the line
                                          Press:
                                                                                      Press:
                                      SHORT KEY  CTRL +   ]                       SHORT KEY  CTRL +   [

                      132   Premium Edition-VII

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