-
Notifications
You must be signed in to change notification settings - Fork 0
/
notas.php
55 lines (44 loc) · 1.89 KB
/
notas.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!--RurikkWare -->
<html>
<head>
<meta http-equiv='Content-type' content='text/html; charset=utf-8' />
<link rel='stylesheet' type='text/css' href='../style.css'>
</head>
<body>
<center>
<?php
if (isset($_POST['submitted'])) {
$promedioCatedras = ($_POST['n1']+$_POST['n2']+$_POST['n3'])/3 ;
$promedioAyudantias = ($_POST['a1']+$_POST['a2']+$_POST['a3'])/3 ;
$promedioQuizz = $_POST['q1'] ;
$promedio = $promedioCatedras*0.75 + $promedioAyudantias*0.1 + $promedioQuizz*0.15;
echo "<h1>Catedras = ".$promedioCatedras."</h1>";
echo "<h1>Ayudantia = ".$promedioAyudantias."</h1>";
echo "<h1>Quiz = ".$promedioQuizz."</h1>";
echo "<h1>NOTA PRESENTACION =".$promedio."</h1>";
if ($promedio>=45){
echo "<h1>Pasaste wn!! :D</h1>";
}else {
echo "<h1>Vas a examen ql</h1>";
}
}else{
echo "
<form action='' method='POST'>
<h1>Catedras (75 %) </h1>
<p><b>certamen 1:</b><br /><input type='number' name='n1' maxlength='2'/>
<p><b>certamen 2:</b><br /><input type='number' name='n2' maxlength='2'/>
<p><b>certamen 3:</b><br /><input type='number' name='n3' maxlength='2'/>
<h1>Pruebas de Ayudantias (10 %)</h1>
<p><b>Ayudantias 1:</b><br /><input type='number' name='a1' maxlength='2'/>
<p><b>Ayudantias 2:</b><br /><input type='number' name='a2' maxlength='2'/>
<p><b>Ayudantias 3:</b><br /><input type='number' name='a3' maxlength='2'/>
<h1>Control (Quizz) (15 %) </h1>
<p><b>Quizz 1:</b><br /><input type='number' name='q1' maxlength='2'/>
<p><input type='submit' value='Calcular Notas' /><input type='hidden' value='1' name='submitted' />
</form>";
}
?>
<div id="pie"><h6><a href="http://pastebin.com/Lw1gkAZg">Source Code</a></h6></div>
</center>
</body>
</html>