Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 86 - 2625 PortGPt V2.1
P. 86

    <SCRIPT>
                          var my_score = parseInt(prompt("Enter a score"));

                          passing_score = 60;
                          if(my_score >= passing_score)
                          {

                            alert("Congratulations on passing the exam");
                          }
                          else
                          {

                            vvwalert("You failed, try harder next time");
                          }
                      </SCRIPT>

                      </BODY>
                      </HTML>
                      On running the above program, we get the following output:

                      84    Premium Edition-VIII

| 81 82 83 84 85 86 87 88 89 90 91 |