<%@ page contentType="text/html;charset=UTF-8" language="java" %><html><head><title>QuestionPaper</title></head><body><h4>Task</h4><p>8 litres are drawn from a cask full of wine and is then filled with water.This operation is performed three more!times.The ratio of the quantity of wine now left in cask to that of the water is 16:65.How much wine did the cask hold originally?<ol><li>18 litres</li><li>24 litres</li><li>39.8 litres</li><li>42 litres</li></ol><form action="AnswerValidator.jsp" method="POST"><input type="text"name="answer"/><input type="submit"value="Next"/></form></p></body></html><%@ page contentType="text/html;charset=UTFW8"language="java"%><head><title>AnswerValidator</title></head><body><p> <% if (request.getParameter("answer").equals("39.8")) { out.println("<h4>Your!answer - is W " + request.getParameter("answer") + "</h4>"); out.println("<h3>This is the RIGHT answer!!!</h3>"); }else{ out.println("<h4>Your answer is - " + request.getParameter("answer") + "</h4>"); out.println("<h3>It is NOT the right answer!</h3>"); } %></p></body></html>Your answer is - 39.8Refinement of the assignmentAnswer 39.8 because:written in the job - which was with drawn four times 8 liters of winea 32 literThe proportion was 16:65That means 16 parts is 7.8 liters of wine7.8 + 32 liters of which was taken = 39.8
Comments