<script language="javascript" type="text/javascript">
// <![CDATA[
function button_onclick() {
Double dogrusayisi= Convert.ToDouble(textfield.Text);
Double puan = 0;
if (select.SelectedIndex == 0) { puan = 20 + 80 * ((dogrusayisi - 0) / (60 - 0)); }
if (select.SelectedIndex == 1) { puan = 20 + 80 * ((dogrusayisi - 0) / (56 - 0)); }
if (select.SelectedIndex == 2) { puan = 20 + 80 * ((dogrusayisi - 0) / (59 - 0)); }
if (select.SelectedIndex == 3) { puan = 20 + 80 * ((dogrusayisi - 4) / (58 - 4)); }
if (select.SelectedIndex == 4) { puan = 20 + 80 * ((dogrusayisi - 4) / (58 - 4)); }
if (select.SelectedIndex == 5) { puan = 20 + 80 * ((dogrusayisi - 1) / (56 - 1)); }
if (puan < 20) { puan = 20; }
if (puan > 100) { puan = 100; }
Label1.Text = puan.ToString("0.00000");
}
// ]]>
</script>
<form id="form1" runat="server">
<table width="325" border="2">
<tr>
<td colspan="2">Dib-Mbsts Puan Hesaplama</td>
</tr>
<tr>
<td width="160">Mbsts Yılı</td>
<td width="140"><label>
<select name="select" id="select">
<option>2021</option>
<option>2020</option>
<option>2019</option>
<option>2018</option>
<option>2017</option>
<option>2016</option>
</select>
</label></td>
</tr>
<tr>
<td>Doğru Cevap sayısı</td>
<td><label>
<input type="text" name="textfield" id="textfield">
</label></td>
</tr>
<tr>
<td> </td>
<td><label>
<input type="submit" name="button" id="button" value="Hesapla" onclick="return button_onclick()">
</label></td>
</tr>
<tr>
<td>Mbsts Puanı</td>
<td>
<asp:Label ID="Label1" runat="server"></asp:Label>
</td>
</tr>
</table>
<p> </p>
</form>