Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
Ejercitariojavascript
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
Yovan Martinez
Ejercitariojavascript
Commits
4a73d379
Commit
4a73d379
authored
May 07, 2022
by
Yovan Martinez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
terminado el ejercitario 01 de javascript
parents
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
0 deletions
+69
-0
css/estilos.css
+0
-0
documento.html
+28
-0
ecuacioncuadratica.js
+41
-0
No files found.
css/estilos.css
0 → 100644
View file @
4a73d379
documento.html
0 → 100644
View file @
4a73d379
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<script
src=
"ecuacioncuadratica.js"
></script>
<title>
documento
</title>
</head>
<body>
<img
src=
""
alt=
""
>
<p
id=
"elelegido"
>
</p>
<p
id=
"acapone"
>
</p>
<div
id=
"imagen"
>
</div>
</body>
</html>
\ No newline at end of file
ecuacioncuadratica.js
0 → 100644
View file @
4a73d379
//Ejercicio nro 1
function
ecuacion
(
a
,
b
,
c
)
{
return
(
-
b
+
Math
.
sqrt
(
Math
.
pow
(
b
,
2
)
-
4
*
a
*
c
))
/
(
2
*
a
);
}
console
.
log
(
ecuacion
(
4
,
-
64
,
2
));
//Ejercicio nro 2
function
ecuacion
(
a
,
b
,
c
)
{
return
(
-
b
-
(
Math
.
sqrt
(
Math
.
pow
(
b
,
2
)
-
4
*
a
*
c
)))
/
(
2
*
a
);
}
ecuacion
(
4
,
-
64
,
2
);
//Ejercicio nro 3
function
cosararahtml
(
id
,
string
)
{
document
.
getElementById
(
id
).
innerHTML
=
string
;
}
cosararahtml
(
"elelegido"
,
"hola soy un texto muy util la verdad"
);
//Ejercicio nro 4
function
numeroaleatorio
(
id
)
{
let
value
=
Math
.
floor
(
Math
.
random
()
*
(
100
-
0
)
+
0
);
document
.
getElementById
(
id
).
innerHTML
=
value
;
}
numeroaleatorio
(
"acapone"
);
//Ejercicio nro 5
function
numeroaleatorio
(
id
)
{
let
value
=
Math
.
floor
(
Math
.
random
()
*
(
100
-
0
)
+
0
);
document
.
getElementById
(
id
).
innerHTML
=
value
;
}
numeroaleatorio
(
"imagen"
);
\ 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