Math, asked by StudyOwl01, 1 month ago

Q1.Write algorithm for the following problems.
1. To add two numbers.
2. To find out if a number is even or odd.​

Answers

Answered by Anonymous
0

Answer:

1. To add two numbers.

Algorithm:

Step 1. Initialize sum = 0

Step 2. Enter the values of a and b

Step 3. Add a and b and store the result in sum.

Step 4. Print the value of sum.

Step 5. End.

2. To find out if a number is even or odd.

Algorithm:

Step 1. Enter rem = 0

Step 2. Enter the value of num.

Step 3. Put rem = num%2

Step 4. If (rem = 0) is true,  display number is an even number.

Step 5. If (rem = 0) is false  display number is an odd number.

Answered by PRINCE100001
5

Step-by-step explanation:

Answer: 1) 2y + 3z = 5

2) x + z = 4

3) 3x - 2y = 7

Step-by-step explanation:

To find that equation of plane,

We need to find a point P which lies on the plane and a another vector which is perpendicular to the required plane.

Equation of plane passing through a point a and perpendicular to vector n is given by,

(\vec{r}-\vec{P})\cdot\vec{n}=0

\begin{gathered}\vec{OP}=3\hat{i}+1\hat{j}+1\hat{k}\\\;\\\vec{OQ}=1\hat{i}-2\hat{j}+3\hat{k}\\\;\\\vec{PQ}=\vec{OQ}-\vec{OP}\\\;\\\vec{PQ}=(1\hat{i}-2\hat{j}+3\hat{k})-(3\hat{i}+1\hat{j}+1\hat{k})\\\;\\\vec{PQ}=-2\hat{i}-3\hat{j}+2\hat{k}\end{gathered}

Case: 1 Equation of plane Parallel to x-axis

If the plane is parallel to x-axis then Normal of the plane should be perpendicular to x - axis.

Let a unit vector

\hat{i}

Now that normal of the plane will be such that, which is perpendicular to both

\vec{PQ}

and

\hat{i}

We can say that,

\begin{gathered}\vec{n}=\hat{i}\;\times\;(-2\hat{i}-3\hat{j}+2\hat{k})\\\;\\\vec{n}=-2(\hat{i}\times\hat{i})-3(\hat{i}\times\hat{j})+2(\hat{i}\times\hat{k})\\\;\\\vec{n}=\vec{0}-3\hat{k}-2\hat{j}\\\;\\\vec{n}=0\hat{i}-2\hat{j}-3\hat{k}\end{gathered}

Now,

Required Equation of Plane will be,

(\vec{r}-\vec{P})\cdot\vec{n}=0

\begin{gathered}(\vec{r}-(3\hat{i}+1\hat{j}+1\hat{k}))\cdot(0\hat{i}-2\hat{j}-3\hat{k})=0\\\;\\\text{Putting}\;\;\vec{r}=x\hat{i}+y\hat{j}+z\hat{k}\\\;\\((x-3)\hat{i}+(y-1)\hat{j}+(z-1)\hat{k})\cdot(0\hat{i}-2\hat{j}-3\hat{k})=0\\\;\\0(x-3)-2(y-1)-3(z-1)=0\\\;\\-2y+2-3z+3=0\\\;\\-2y-3z+5=0\\\;\\2y+3z-5=0\\\;\\2y+3z=5\end{gathered}

This is the required equation of the plane which is parallel to x-axis and passing through the points (3,1,1) and (1,-2,3).

Case: 2 Equation of plane Parallel to y-axis

If the plane is parallel to y-axis then Normal of the plane should be perpendicular to y - axis.

Let a unit vector

\hat{j}

Now that normal of the plane will be such that, which is perpendicular to both \vec{PQ}

PQ

and

\hat{j}

We can say that,

\begin{gathered}\vec{n}=\hat{j}\;\times\;(-2\hat{i}-3\hat{j}+2\hat{k})\\\;\\\vec{n}=-2(\hat{j}\times\hat{i})-3(\hat{j}\times\hat{j})+2(\hat{j}\times\hat{k})\\\;\\\vec{n}=2\hat{k}+\vec{0}+2\hat{i}\\\;\\\vec{n}=2\hat{i}-0\hat{j}+2\hat{k}\end{gathered}

Now,

Required Equation of Plane will be,

\begin{gathered}(\vec{r}-\vec{P})\cdot\vec{n}=0\\\;\\(\vec{r}-(3\hat{i}+1\hat{j}+1\hat{k}))\cdot(2\hat{i}-0\hat{j}+2\hat{k})=0\\\;\\\text{Putting}\;\;\vec{r}=x\hat{i}+y\hat{j}+z\hat{k}\\\;\\((x-3)\hat{i}+(y-1)\hat{j}+(z-1)\hat{k})\cdot(2\hat{i}-0\hat{j}+2\hat{k})=0\\\;\\2(x-3)-0(y-1)+2(z-1)=0\\\;\\2x-6+2z-2=0\\\;\\2x+2z-8=0\\\;\\2x+2z=8\\\;\\x+z=4\end{gathered}

This is the required equation of the plane which is parallel to y-axis and passing through the points (3,1,1) and (1,-2,3).

Case: 3 Equation of plane Parallel to z-axis

If the plane is parallel to x-axis then Normal of the plane should be perpendicular to z - axis.

Let a unit vector

\hat{k}

Now that normal of the plane will be such that, which is perpendicular to both

\vec{PQ}

and

\hat{k}

We can say that,

\begin{gathered}\vec{n}=\hat{k}\;\times\;(-2\hat{i}-3\hat{j}+2\hat{k})\\\;\\\vec{n}=-2(\hat{k}\times\hat{i})-3(\hat{k}\times\hat{j})+2(\hat{k}\times\hat{k})\\\;\\\vec{n}=-2\hat{j}+3\hat{i}+\vec{0}\\\;\\\vec{n}=-2\hat{j}+3\hat{i}+0\hat{k}\\\;\\\vec{n}=3\hat{i}-2\hat{j}+0\hat{k}\end{gathered}

Now,

Required Equation of Plane will be,

\begin{gathered}(\vec{r}-\vec{P})\cdot\vec{n}=0\\\;\\(\vec{r}-(3\hat{i}+1\hat{j}+1\hat{k}))\cdot(3\hat{i}-2\hat{j}+0\hat{k})=0\\\;\\\text{Putting}\;\;\vec{r}=x\hat{i}+y\hat{j}+z\hat{k}\\\;\\((x-3)\hat{i}+(y-1)\hat{j}+(z-1)\hat{k})\cdot(3\hat{i}-2\hat{j}+0\hat{k})=0\\\;\\3(x-3)-2(y-1)+0(z-1)=0\\\;\\3x-9-2y+2=0\\\;\\3x-2y-7=0\\\;\\3x-2y=7\end{gathered}

This is the required equation of the plane which is parallel to z-axis and passing through the points (3,1,1) and (1,-2,3).

Similar questions