
x
2
+
y
2
=
16
...
...
...
...
...
...
.
.
(
1
)
x + y = 4 (2)
rearrange (2) to y = 4 - x (could do x = 4 - y )
substitute y = 4 - x into (1)
hence:
x
2
+
(
4
−
x
)
2
=
16
⇒
x
2
+
16
−
8
x
+
x
2
=
16
and
2
x
2
−
8
x
+
16
−
16
=
0
⇒
2
x
2
−
8
x
=
0
factor and solve : 2x(x - 4 ) = 0
⇒
x
=
0
,
x
=
4
substitute these values into y = 4 - x , to find corresponding values of y.
x = 0 : y = 4 - 0 = 4 → (0 , 4)
x = 4 : y = 4 - 4 = 0 → (4 , 0 )
These are the points of intersection with the line x +y = 4 and the circle
x
2
+
y
2
=
16
Answer link
Объяснение:
Відповідь:
Дивись фото
Пояснення:
<!DOCTYPE html>
<html>
<head>
<title>Price</title>
<meta charset="utf-8">
</head>
<body>
<p>стоимости переговоров</p>
</body>
<script>
{/*Написать логическое выражение для определения стоимости переговоров, если стоимость переговоров с 22 часов до 8 часов на 20% ниже, а в субботу и в воскресенье дополнительно предоставляется скидка 10%. */}
t = +prompt('время разговоров от 0 до 24 часов')
dt = +prompt('продолжительность разговора в минутах')
s = +prompt('стоимость минуты разговора')
d = +prompt('день недели от 1 до 7')
console.log('t=',t,'dt=', dt, 's=', s, 'd=', d)
function Price (t, dt, d, s) {
let startTalk = t*60
let price = 0
console.log('day = ', d)
for (let i =1; i<=dt; i++){
let night = false
let holiday = false
let p = s
if( (startTalk+i)%1440 === 0 ){
if (d<7){
d=d+1
console.log('day = ', d)
} else {
d=1
console.log('day = ', d)
}
}
if ( (startTalk+i)%1440>=1320 || (startTalk+i)%1440<480){
night = true
}
if ( d === 6 || d===7){
holiday = true
}
if (night){
p = p - s*0.2
}
if (holiday){
p = p-s*0.1
}
price = price+p
console.log('стоимости '+ i+'мин. = '+ p.toFixed(2)+'$')
}
console.log('fin.price', price.toFixed(2), '$')
return price.toFixed(2)
}
{/*Price(t, dt, d, s)*/}
alert('стоимости переговоров ' + '$' + Price(t, dt, d, s))
</script>
</html>
