x
2
+
y
=
16
...
.
(
1
)
x + y = 4 (2)
rearrange (2) to y = 4 - x (could do x = 4 - y )
substitute y = 4 - x into (1)
hence:
4
−
⇒
8
and
0
factor and solve : 2x(x - 4 ) = 0
,
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
Answer link
Объяснение:
Відповідь:
#include <iostream>
#include <cstdlib>
#include <time.h>
using namespace std;
void SetArray(int *A,int N){
for(int i = 0; i < N; i++){
A[i] = rand() % 10 + 1;
}
void PrintArray(int *A,int N){
for(int i = 0;i < N; i++){
cout << A[i] << " ";
void expression(int *A,int N,int k,int l){
for(int i = k; k < l; k++ , l--){
swap(A[k], A[l]);
int main(){
srand(time(NULL));
setlocale(LC_ALL , "Ukrainian");
int N,k,l;
cout << "Введiть розмiр масиву: ";
cin >> N;
int *A = new int[N];
SetArray(A,N);
PrintArray(A,N);
cout << "\nВведiть k: ";
cin >> k;
cout << "Введiть l: ";
cin >> l;
expression(A,N,k,l);
delete[] A;
return 0;
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
Объяснение:
Відповідь:
#include <iostream>
#include <cstdlib>
#include <time.h>
using namespace std;
void SetArray(int *A,int N){
for(int i = 0; i < N; i++){
A[i] = rand() % 10 + 1;
}
}
void PrintArray(int *A,int N){
for(int i = 0;i < N; i++){
cout << A[i] << " ";
}
}
void expression(int *A,int N,int k,int l){
for(int i = k; k < l; k++ , l--){
swap(A[k], A[l]);
}
}
int main(){
srand(time(NULL));
setlocale(LC_ALL , "Ukrainian");
int N,k,l;
cout << "Введiть розмiр масиву: ";
cin >> N;
int *A = new int[N];
SetArray(A,N);
PrintArray(A,N);
cout << "\nВведiть k: ";
cin >> k;
cout << "Введiть l: ";
cin >> l;
expression(A,N,k,l);
PrintArray(A,N);
delete[] A;
return 0;
}