Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
js-e001
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fernando David Lopez
js-e001
Commits
6b03bde6
Commit
6b03bde6
authored
Oct 11, 2018
by
roshka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ejercicio de JS
parents
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
0 deletions
+84
-0
.#Cuestionario.txt
+2
-0
Ejercicio.html
+11
-0
Home.js
+71
-0
No files found.
.#Cuestionario.txt
0 → 120000
View file @
6b03bde6
roshka@rshkbootcampws.roshka.com.py.1966:1539268254
\ No newline at end of file
Ejercicio.html
0 → 100644
View file @
6b03bde6
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
Ejercicios
</title>
</head>
<body>
<h1>
Ecuaciones
</h1>
<script
src=
"Home.js"
></script>
</body>
</html>
\ No newline at end of file
Home.js
0 → 100644
View file @
6b03bde6
let
x
=
10
;
let
y
=
5
;
let
aux
;
console
.
log
(
"Suma: "
+
(
x
+
y
));
console
.
log
(
"Resta: "
+
(
x
-
y
));
console
.
log
(
"Multiplicacion: "
+
(
x
*
y
));
console
.
log
(
"Division: "
+
(
x
/
y
));
console
.
log
(
"Potencia: "
+
(
x
**
y
));
console
.
log
(
"Resto de la Division: "
+
(
x
%
y
));
console
.
log
(
"-----------------------"
);
let
valor1
=
1
;
let
valor2
=
5
;
let
valor3
=
-
8
;
let
valor4
=
2
;
let
valor5
=
-
8
;
let
valor6
=
15
;
let
valor7
=
10
;
let
valor8
=
20
;
let
valor9
=
9
;
let
positivo1
=
((
-
valor2
)
+
(((
valor2
**
2
)
-
(
4
*
valor1
*
valor3
))
**
0.5
))
/
(
2
*
valor1
);
let
negativo1
=
((
-
valor2
)
-
(((
valor2
**
2
)
-
(
4
*
valor1
*
valor3
))
**
0.5
))
/
(
2
*
valor1
);
let
positivo2
=
((
-
valor5
)
+
(((
valor5
**
2
)
-
(
4
*
valor4
*
valor6
))
**
0.5
))
/
(
2
*
valor3
);
let
negativo2
=
((
-
valor5
)
-
(((
valor5
**
2
)
-
(
4
*
valor4
*
valor6
))
**
0.5
))
/
(
2
*
valor3
);
let
positivo3
=
((
-
valor8
)
+
(((
valor8
**
2
)
-
(
4
*
valor7
*
valor9
))
**
0.5
))
/
(
2
*
valor7
);
let
negativo3
=
((
-
valor8
)
-
(((
valor8
**
2
)
-
(
4
*
valor7
*
valor9
))
**
0.5
))
/
(
2
*
valor7
);
console
.
log
(
"Ecuaciones Cuadraticas:"
);
console
.
log
(
"x^2 + 5x - 8 = 0"
);
if
(
positivo1
>
0
)
{
console
.
log
(
positivo1
);
console
.
log
(
negativo1
);
}
else
{
console
.
log
(
"No se puede resolver"
)
}
console
.
log
(
"2x^2 - 8x + 15 = 0"
);
if
(((
valor5
**
2
)
-
(
4
*
valor4
*
valor6
))
>
0
)
{
console
.
log
(
positivo2
);
console
.
log
(
negativo2
);
}
else
{
console
.
log
(
"No se puede resolver"
)
}
console
.
log
(
"10x^2 + 20x + 9 = 0"
);
if
(
positivo3
>
0
)
{
console
.
log
(
positivo3
);
console
.
log
(
negativo3
);
}
else
{
console
.
log
(
"No se puede resolver"
)
}
console
.
log
(
"-------------------------------------"
)
let
resultado1
=
Math
.
sin
(
120
)
-
Math
.
cos
(
60
);
let
resultado2
=
(
Math
.
sin
(
90
)
**
2
)
*
(
Math
.
cos
(
10
)
**
2
);
console
.
log
(
"Resultado 1: "
+
resultado1
);
console
.
log
(
"Resultado 2: "
+
resultado2
);
console
.
log
(
"-------------------------------------"
)
//Para crear un objeto String
String
=
new
String
(
"Objeto"
);
console
.
log
(
String
);
//Para crear una cadena primitiva
s_primitivo
=
String
(
"Primitivo"
);
console
.
log
(
String
);
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment