File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Viagem 1:Ovelha (Ida) Ovelha - x - x
2+ Viagem 2:Lobo (Ida) Ovelha - Lobo - x
3+ Viagem 2.5:Ovelha (Volta) x - Lobo - x
4+ Viagem 3:Alfafa (Ida) x - Lobo - Alfafa
5+ Viagem 4:Ovelha (Ida) Ovelha - Lobo - Alfafa
Original file line number Diff line number Diff line change 1+ .container {
2+ margin : 0 auto;
3+ width : 300px ;
4+ background-color : # f7f7f7 ;
5+ padding : 10px ;
6+ }
7+
8+ input [type = "text" ] {
9+ width : 100% ;
10+ margin : 4px auto;
11+ }
12+
13+ input [type = "submit" ] {
14+ width : 100px ;
15+ }
16+
17+ p {
18+ text-align : center;
19+ }
20+
21+ .buttonholder {
22+ text-align : center;
23+ }
24+
25+ input [disabled ] {
26+ background-color : # f8f8f8 ;
27+ border-radius : 10px ;
28+ width : 80% ;
29+ }
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < title > Calcular Média</ title >
6+ < link rel ="stylesheet " href ="../css/styles.css ">
7+ < script src ="../js/calc.js "> </ script >
8+ </ head >
9+ < body >
10+ < div class ="container ">
11+ < p > RandomNumber</ p >
12+ < input type ="text " id ="a ">
13+ < input type ="text " id ="b ">
14+ < input type ="text " id ="c ">
15+ < input type ="submit " onclick ="CalcTree() ">
16+ < div id ="resultado "> </ div >
17+ </ body >
18+ </ html >
Original file line number Diff line number Diff line change 1+ function CalcTree ( ) {
2+ var a = parseInt ( document . getElementById ( "a" ) . value ) ;
3+ var b = parseInt ( document . getElementById ( "b" ) . value ) ;
4+ var c = parseInt ( document . getElementById ( "c" ) . value ) ;
5+
6+ var media = ( a + b + c ) / 3 ;
7+
8+ document . getElementById ( "resultado" ) . innerHTML = "Resultado:" + media
9+
10+ console . log ( a + b + c ) ;
11+ }
You can’t perform that action at this time.
0 commit comments